Discussion:
Request with Return Status code over 999 not received !
(too old to reply)
JB___
2006-09-19 09:14:01 UTC
Permalink
Hi,

I am currently developing a winhttp client that post data on a server
(Tomcat) and wait for his repsonse.
I am currently able to treat all the receive request that have a return
status between 100 - 999 (even those who aren't common status).

The server I am working with is returning a 10200 code when the request is
correctly treated but, using winhttp I am unable to receive the response (I
have see it using an http sniffer).

The error occured during "WinHttpReceiveResponse" use. This function return
false for status code over 999. Using getLastEroor I get the following
message: "ERROR_WINHTTP_INVALID_SERVER_RESPONSE".

Do you know if there is a way to extend the range of accepted status code by
winhttp ?

Thanks.
Jason Viers
2006-09-19 12:47:35 UTC
Permalink
Post by JB___
The error occured during "WinHttpReceiveResponse" use. This function return
false for status code over 999. Using getLastEroor I get the following
message: "ERROR_WINHTTP_INVALID_SERVER_RESPONSE".
It means as it says; it's not a valid response. WinHTTP is a HTTP
client, and the HTTP spec clearly defines what return codes are allowed.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Return codes other than what's listed there aren't 'uncommon', they're
illegal.

If you feel the need to communicate some extra information with new
return codes, then find the closest existing return code and put that
extra information in a header, or somewhere in the response.

Jason

Continue reading on narkive:
Loading...