-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unhandled std::logic_error exception after resending HTTP 'PUT' requests on Linux #1301
Comments
Environment: Stack trace for the unhandled exception: Stack trace for clearing the body after the first attempt (running on Windows): |
Hi, Im trying to archieve something similar but using HTTP interceptors. |
Hi. We are currently using the solution that I have described above. And everything is working fine so far. |
Hi!
We have C++ REST client application that uses cpprestsdk. We have the scenario when we get unhandled std::logic_error exception (uninitialized stream object).
The mentioned scenario is:
I managed to debug the case under Windows. I see that after the first attempt to send the request we have empty body (empty 'm_inStream: concurrency::streams::istream' field).
The stream is reset here:
void request_context::complete_headers()
{
// We have already read (and transmitted) the request body. Should we explicitly close the stream?
// Well, there are test cases that assumes that the istream is valid when t receives the response!
// For now, we will drop our reference which will close the stream if the user doesn't have one.
m_request.set_body(Concurrency::streams::istream());
m_request_completion.set(m_response);
}
The main question is whether we actually have to reset the body after request has been send? I will try to comment the string with the body clearing and see the result.
Thanks!
The text was updated successfully, but these errors were encountered: