Discussion:
HttpSendRequest doesn't send content-length with Head command
(too old to reply)
lawrencemd23
2006-08-31 21:56:01 UTC
Permalink
I have a wininet application that works fine on most PCs. When I try to get
the length of an internet file I send a "Head" command with some post data
and winInet adds in the content-length header for me. This appears to not
work on
a customers PC and from the debug logs the web server returns status 411 to
my head request "content-length not given". I using a head to get the size
of the results from a CGI script.

Is there a reason why sometimes this header would not be included. The
Customer
says he has WinXP with all the latest service packs.
Alex Turmer
2006-09-04 12:14:17 UTC
Permalink
Post by lawrencemd23
I have a wininet application that works fine on most PCs. When I try to get
the length of an internet file I send a "Head" command with some post data
and winInet adds in the content-length header for me. This appears to not
work on
a customers PC and from the debug logs the web server returns status 411 to
my head request "content-length not given". I using a head to get the size
of the results from a CGI script.
Is there a reason why sometimes this header would not be included. The
Customer
says he has WinXP with all the latest service packs.
This does not really have a great deal of information to go on. Is it
possible that something on the client machine is causing the content
length to be zero or the request to be sent as a GET? Alternatively,
could this be a proxy thing. If the client is connecting through a
proxy in say HTTP 1.0, maybe the content is not being set.

Cheers

AJ
--
www.deployview.com
www.nerds-central.com
www.project-network.com
Loading...