Genaf
November 11th, 2003, 08:25 AM
Hi, All.
I use the WinInet functions in order to send the POST HTTP requests.
One of the requests should be sent with the Connection: close
header.
I tried to add this header in 2 ways:
a) HttpAddRequestHeaders(hURLInet, "Connection: close\r\n", -1, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDREQ_FLAG_COALESCE)
b) HttpSendRequest(hURLInet, "Connection: close\r\n", -1, PostXMLStr, strlen(PostXMLStr))
but in both cases the request was sent without the header.
I found that I can successfully add other headers ("Connection: keep-alive", for example).
Is someone knows why I have a problem with the "Connection: close" header adding?
Thanx.
I use the WinInet functions in order to send the POST HTTP requests.
One of the requests should be sent with the Connection: close
header.
I tried to add this header in 2 ways:
a) HttpAddRequestHeaders(hURLInet, "Connection: close\r\n", -1, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDREQ_FLAG_COALESCE)
b) HttpSendRequest(hURLInet, "Connection: close\r\n", -1, PostXMLStr, strlen(PostXMLStr))
but in both cases the request was sent without the header.
I found that I can successfully add other headers ("Connection: keep-alive", for example).
Is someone knows why I have a problem with the "Connection: close" header adding?
Thanx.