Open aksswami opened 6 years ago
Try adding a config to your client web::http::client::http_client_config cfg; cfg.set_timeout(std::chrono::seconds(3600));
http_client client(U("http://127.0.0.1:10000"),cfg);
I have already tried increasing the timeout. But I don't think this is the reason behind this error. Even if the request timed_out it should fail gracefully not in operation_aborted.
Try closing your stream in the response handler.
How do you suggest to close the stream in response handler? For this, I have to somehow capture the stream variable in response lambda. And I don't know how to do that with consecutive then
expressions.
I am trying upload large file ranging from 10 MB to few GB and somehow request always end up with an exception while stream uploading large files. The exception I get is
web::http::http_exception: Failed to read HTTP status line
I traced back the origin of exception and it's coming from handler to connection. (http_client_asio.cpp) And I am getting
operation_aborted
from asio for some reason. I have tried to debug it further but due to my limited knowledge didn't get any solution or root cause.Also, the request seems to upload the full data in MB case but it fails to close successfully, not sure why.
Here is the sample code I am trying
Any help would be really appreciated.