HTTP GET, Content-Encoding: gzip

Discussion to talk about software related topics only.
Post Reply
ddeham
Posts: 9
Joined: Tue Feb 24, 2009 7:37 am

HTTP GET, Content-Encoding: gzip

Post by ddeham »

Hi,

I need to download a web page from another embedded device, and parse some data from that page. I tried using similar code that has worked before. However, this particular device sends out the web pages encoded with gzip.
Here's the http header:

HTTP/1.0 200 OK Date: Wed, 28 Jun 2006 13:30:04 GMT Server: Boa/0.94.13
Connection: close
Content-Encoding: gzip
Content-Type: text/html
Set-Cookie:

Is there a way to tell the server not to gzip the reply?

If not, what is the easiest way to decode the gzip encoding in a Netburner MOD5282? I found the gnu gzip source code but I'm having trouble importing the code into my project. Is there a stand-alone "inflate" source code module available somewhere that would be easier to import? HELP!

Thanks,

Dan
User avatar
Forrest
Posts: 287
Joined: Wed Apr 23, 2008 10:05 am

Re: HTTP GET, Content-Encoding: gzip

Post by Forrest »

ddeham wrote:Hi,

I need to download a web page from another embedded device, and parse some data from that page. I tried using similar code that has worked before. However, this particular device sends out the web pages encoded with gzip.
Here's the http header:

HTTP/1.0 200 OK Date: Wed, 28 Jun 2006 13:30:04 GMT Server: Boa/0.94.13
Connection: close
Content-Encoding: gzip
Content-Type: text/html
Set-Cookie:

Is there a way to tell the server not to gzip the reply?

If not, what is the easiest way to decode the gzip encoding in a Netburner MOD5282? I found the gnu gzip source code but I'm having trouble importing the code into my project. Is there a stand-alone "inflate" source code module available somewhere that would be easier to import? HELP!

Thanks,

Dan
The server has the file stored in zip, so I do not think you can request a different encoding. At one point a customer stated that he was able to get the LZO and miniLZO libraries to work with our code. More info at
http://www.oberhumer.com/opensource/lzo/. Please note that this does not create zip files, but does offer compression. I have never used this, but you may be able to get it working with some experimentation.
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
Post Reply