You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deferred_response constructor includes a const std::string& content = "" parameter that is documented as:
Besides the callback, optionally, you can provide a content parameter that sets the initial message sent immediately to the client.
The content parameter is passed to the base class string_response constructor where it is assigned to the content member but never actually consumed because string_response::get_raw_response() is never called.
This behavior might appear to have been removed by ed0841d in #145, but it likely didn't work even in eea93bd because get_raw_response() is a virtual function.
The tests don't expect the content parameter to be sent either:
Prerequisites
Description
The
deferred_response
constructor includes aconst std::string& content = ""
parameter that is documented as:The
content
parameter is passed to the base classstring_response
constructor where it is assigned to thecontent
member but never actually consumed becausestring_response::get_raw_response()
is never called.This behavior might appear to have been removed by ed0841d in #145, but it likely didn't work even in eea93bd because
get_raw_response()
is a virtual function.The tests don't expect the content parameter to be sent either:
libhttpserver/test/integ/deferred.cpp
Line 164 in d249ba6
At this point in the interest of bug compatibility maybe just change the parameter name from "content" to "unused" and fix the docs.
Steps to Reproduce
Send a
deferred_response
with a non-emptycontent
argument such aslibhttpserver/test/integ/deferred.cpp
Line 103 in d249ba6
Expected behavior: Content argument is transmitted.
Actual behavior: Content argument is ignored.
Reproduces how often: 100%
Versions
Linux hydrol2 4.18.0-477.15.1.el8_8.x86_64 #1 SMP Fri Jun 2 08:27:19 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux
Additional Information
The text was updated successfully, but these errors were encountered: