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
This question might be as related to HTTP as it is to Pistache itself but here we are :
Some operations performed by our server (built with Pistache ❤️) are long (several minutes before completion), so they trigger a client-side timeout.
I came across the 102 PROCESSING status code, that might be used to indicate "wait a bit more", but I am not sure it can be used with Pistache as following:
voidonRequest(const Http::Request& request, Http::ResponseWriter response) {
sleep(2); // simulate long task
response.send(Http::Code::Processing);
sleep(2); // a bit more of that long task
response.send(Http::Code::Ok);
}
This produces the following TCP trace:
2 remarks:
Both responses are sent together after 4 seconds (I would have expected one after 2 sec and another at 4 sec)
The second response sort of "contains both the codes, concatenated", and is not interpreted correctly by the HTTP client I'm using
I, honestly, cannot point at the culprit :
Is it expected behaviour, and the client just does not support that use case ?
Is it a Pistache issue ?
Is it just my poor understanding of HTTP ?
Thanks for the hard work on the library by the way !
The text was updated successfully, but these errors were encountered:
Hello !
This question might be as related to HTTP as it is to Pistache itself but here we are :
Some operations performed by our server (built with Pistache ❤️) are long (several minutes before completion), so they trigger a client-side timeout.
I came across the
102 PROCESSING
status code, that might be used to indicate "wait a bit more", but I am not sure it can be used with Pistache as following:This produces the following TCP trace:
2 remarks:
I, honestly, cannot point at the culprit :
Thanks for the hard work on the library by the way !
The text was updated successfully, but these errors were encountered: