[web_server_idf] Inline send() to reduce httpd task stack depth (#15045)
This commit is contained in:
1 parent
30f66be1da
commit
b2b61bea6a
2 files changed
+11
-15
No files matched your search
@@ -262,19 +262,6 @@ StringRef AsyncWebServerRequest::url_to(std::span<char, URL_BUF_SIZE> buffer) co
|
||||
return StringRef(buffer.data(), decoded_len);
|
||||
}
|
||||
|
||||
void AsyncWebServerRequest::send(AsyncWebServerResponse *response) {
|
||||
httpd_resp_send(*this, response->get_content_data(), response->get_content_size());
|
||||
}
|
||||
|
||||
void AsyncWebServerRequest::send(int code, const char *content_type, const char *content) {
|
||||
this->init_response_(nullptr, code, content_type);
|
||||
if (content) {
|
||||
httpd_resp_send(*this, content, HTTPD_RESP_USE_STRLEN);
|
||||
} else {
|
||||
httpd_resp_send(*this, nullptr, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void AsyncWebServerRequest::redirect(const std::string &url) {
|
||||
httpd_resp_set_status(*this, "302 Found");
|
||||
httpd_resp_set_hdr(*this, "Location", url.c_str());
|
||||
|
||||
Reference in new issue
Block a user