Discussion:
HttpSendRequest Hangs
(too old to reply)
Robert Ferraro
2004-07-14 20:14:46 UTC
Permalink
Hello,

I'm using the WinINet function "HttpSendRequest" to access a server
containing a .CGI script. The .CGI script pushes out a stream of JPEG
images.

The "HttpSendRequest" function seems to be loading data, but it never gets
to the end and it never times out. When I manually disconnect from within my
app, the function returns false. I've set a 30-second timeout using the
"InternetSetOption" function, but it seems to be ignoring this flag.

This behaviour is also evident with Internet Explorer and Netscape
browsers--continuously loading data, no timeout.

Is this a known issue, and is there a workaround?

Thanks,

Robert Ferraro.
Stephen Sulzer
2004-07-15 06:21:53 UTC
Permalink
This post might be inappropriate. Click to display it.
Robert Ferraro
2004-07-15 12:03:59 UTC
Permalink
This post might be inappropriate. Click to display it.
Stephen Sulzer
2004-07-16 01:08:57 UTC
Permalink
See Brian Combs' posting from this newsgroup on using the debug version on
WinInet.dll:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=GVKrM20GEHA.3800%40cpmsftngxa06.phx.gbl

You can use the debug WinInet.dll to log all the HTTP traffic between the
client and server. However, the FTP link that Brian mentions does not work
for me. So another location where you can download the debug WinInet.dll is
http://www.mathies.com/win32tips.html. For a Windows XP machine, you should
get the DLL with version 6.0.2800.1106.

As for NETMON, it is available with Windows 2000 Server and Windows Server
2003, but is not included in Windows XP, and AFAIK is not freely
downloadable from Microsoft. Google for "HTTP sniffer" to find some
alternatives.

Stephen
Post by Robert Ferraro
Hi Stephen,
Thanks very much for your reply.
I believe you're right, all evidence so far points to HttpSendRequest
consuming the JPEG data thinking it is part of the header data.
I don't have control over the CGI script; it's inside a particular network
camera web server, and all camera models of that type have the same
implementation for pushing image data out to the client.
Your suggestion to investigate the raw HTTP traffic is a good one. Do you
know where can I get the debug version of WinINet.dll? Also, there appear to
be many versions of NETMON available--can you recommend one in particular?
Best regards,
Robert Ferraro.
Robert Ferraro
2004-07-16 12:01:07 UTC
Permalink
Hi Stephen,

Thanks for the tips.

I did find an alternative to NETMON, something called Ethereal that seems to
work well. In fact, using Ethereal, I was able to confirm your theory; the
.CGI script header information does not include a delimiter, and each header
packet contains JPEG data.

I'll have to see if the camera supports custom coding to get by this issue.

Thanks again for your help.


Best regards,

Robert Ferraro

RFC Services: Professional-Grade Network Camera Surveillance and Recording
Software

http://www.visualhindsight.com/
Post by Stephen Sulzer
See Brian Combs' posting from this newsgroup on using the debug version on
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=GVKrM20GEHA.3800%40cpmsftngxa06.phx.gbl
Post by Stephen Sulzer
You can use the debug WinInet.dll to log all the HTTP traffic between the
client and server. However, the FTP link that Brian mentions does not work
for me. So another location where you can download the debug WinInet.dll is
http://www.mathies.com/win32tips.html. For a Windows XP machine, you should
get the DLL with version 6.0.2800.1106.
As for NETMON, it is available with Windows 2000 Server and Windows Server
2003, but is not included in Windows XP, and AFAIK is not freely
downloadable from Microsoft. Google for "HTTP sniffer" to find some
alternatives.
Stephen
Post by Robert Ferraro
Hi Stephen,
Thanks very much for your reply.
I believe you're right, all evidence so far points to HttpSendRequest
consuming the JPEG data thinking it is part of the header data.
I don't have control over the CGI script; it's inside a particular network
camera web server, and all camera models of that type have the same
implementation for pushing image data out to the client.
Your suggestion to investigate the raw HTTP traffic is a good one. Do you
know where can I get the debug version of WinINet.dll? Also, there
appear
Post by Stephen Sulzer
to
Post by Robert Ferraro
be many versions of NETMON available--can you recommend one in particular?
Best regards,
Robert Ferraro.
Loading...