Results 1 to 14 of 14

Thread: http response decode

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    http response decode

    Hi guys,i wanted o ask something

    Im getting this strange http server response :


    .....
    Content-Encoding: gzip
    Vary: Accept-Encoding
    Date: Fri, 21 Nov 2008 10:36:32 GMT
    Server: lighttpd/1.4.18

    1035
    ‹

    WHen im using the RTF box i get more chars like encoded and when i try to paste that here i get ‹


    What could that be, and can it be solved, what does your experience say?
    Thanks for helping me out.

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: http response decode

    The server that sent that is using http compression. See more here.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: http response decode

    Read it and didn't understand a clue hahaha LOL
    Thanks for helping me out.

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: http response decode

    Well, think of it this way. You can open a text document in Notepad and read it. But what happens if you zip the text document? Try open up the zip file in notepad, it just wont work... You need to unzip it first.

  5. #5
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: http response decode

    http://planetsourcecode.com/vb/scrip...64920&lngWId=1

    I've found some examples, on planetsourcecode.com. I didnt tested it, but as the author said it should do the gunzip, you are after.

    Let me know if it helps, i'm also interested (but too lazy to test it right now hihi)

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: http response decode

    hehehe...i will test it today ... i'll let you know...thanks
    Thanks for helping me out.

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: http response decode

    I've tried it m8..it doesn't seem to work for me because i get all those square chars back from the server response..and that soft can't decode that xD
    Thanks for helping me out.

  8. #8
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: http response decode

    gzip doesnt seems to be changed its protocol. it should work, but you may missed something!

    ill check out later

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: http response decode

    Please let me know...

    I get a strange response that it's encoded...

    When i use rtf i can get some squrares...but if i use textbox i just get 3 chars...

    Don't know how that program can decode that
    Thanks for helping me out.

  10. #10
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: http response decode

    Just like i told you, you are missed something. VBzlib1.dll is able to decompress a gzip'ed response.
    Here is the example, i modified, to use a winsock to connect to any server, then get any URI. also its able to accept the response as gzip compressed.

    My code split up the response, into each fields. Walk thru the code, to learn how it could be done. Mine is not the best code, but its fairy good for a demo. Theres some HTTP response variants i included, for better compatibility!

    Dont forget to download the vbzlib1.dll, and just place it in the folder where the app is executed, thats all.

    -------------------------------

    By default, the server is www.zlib.net, and the ULR field is empty. Its ok. You can set the GZIP, to request the server to send its response in gzip compression.

    Theres i found, that for some reason some server sends some ILLEGAL GZIP data, that this code cannot uncompress, for some unknown reason (i really have no idea why)

    To test the in-compatible response, just set the server to www.cyberciti.biz, leave the url field as empty, and set the GZIP checkbox. The strange thing is, the gzip'ed stuff will work, if you get some SMALLER file from that server, but not the BIG ASS index.html that is the default file. To test, that the server CAN send proper gzip data, just set the URL to "tips/wp-content/themes/nixcraft/style.css" (without the ""-s)
    Attached Files Attached Files

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: http response decode

    ok..will try it now..
    Thanks for helping me out.

  12. #12
    New Member
    Join Date
    Dec 2008
    Posts
    1

    Re: http response decode

    Oh, so close and yet so far...

    The site I need to download from gets the DATA_ERROR message. Yet, when I hit the same URL with IE or Firefox, it sends gzipped data and they display it properly.

    So, I doubt that it's actually illegal data, but more likely something not being handled properly at the receiving or decoding end.

    Have you made any progress with this? Success is so close I can taste it.

  13. #13

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: http response decode

    Well i coulndt get it to work...i get initial data and then <||> 3 o 4 chars like that...and with my http degubber i can see alot of data that has not been processed by vb

    i am using

    Accept-Encoding: gzip" & vbCrLf
    to send the get request...



    at data arrival :
    wGet.GetData strResponse, vbString, bytesTotal
    and still cannot encoded it :S
    Last edited by batori; Jan 25th, 2009 at 12:03 PM.
    Thanks for helping me out.

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: http response decode

    this is what i cant decode

    Thanks for helping me out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width