|
-
Feb 15th, 2009, 07:49 AM
#1
Re: Winsock vs Inet question (tricky)
Most of the web servers are listening for instructions in the GET headers. For example, if you are including the "Accept-Encoding" instruction, in your GET header, the server will send out the gzip'ed content. Otherwise, the output should be plain text.
'Winsock1.SendData ("Accept-Encoding: gzip" + vbCrLf) <- dont send this line.
Unfortunately, there are also some servers that are set up by default, to send out gzip'ed content always, it doesnt matter you set the accept encoding or not.
I have done an experiment about how to "decompress" the gziped content from any webserver, by using the "vbzlib1.dll". Most of the cases it works nice, and decompress the gziped content. But sometimes, well.. it doesnt, and dont ask me the reason, i didnt found it..
I have used the czlib class, by James Johnston, but with some bit modifications. Here is the link you can get the original class.
http://www.Planet-Source-Code.com/vb...64920&lngWId=1
And, here is the modified zlib.dll, that this class is uses.
http://www.techknowpro.com/vb/vbzlib/vbzlib1.dll
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|