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 :heart:) 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:
void onRequest(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 !
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 :heart:) 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:![image](https://user-images.githubusercontent.com/18717837/210583014-b70e2386-0a94-4b84-add5-1cc4388fa287.png)
2 remarks:
I, honestly, cannot point at the culprit :
Thanks for the hard work on the library by the way !