Sign in to follow this  
Followers 0
mary

send a HTTP get and ask only content without header

4 posts in this topic

Hi!

Is there a way to do a http request and ask the server to send only content without header ?

my goal is to get a Http_Reponse in one packet with no compression, in order to optimise speed of may project:

sniffing HTTP packet i found that:

1)without compression request, the server send me a reponse in 2 packets:

- The 1st packet contain Header and the begin of http body (==> i don't need that in my packet)

- the 2nd contain significant data (i need only this one)

1) http request with compression i had a reponse with one packet:

it is good but it consume a time to compress (server side) and uncompress (client side)

my english is so poor to understand all http RFC, so mybe someone have a solution.

thinks a lot

Share this post


Link to post
Share on other sites



From my reading it does not appear to be possible.

The "HEAD" method will retrieve only the Response Header, but there is not corresponding BODY method.

The GET method (actually all methods) can specify a Range value so that only a portion of the entity-body is returned, but it does not appear that it can affect the transmission of the entity-header.

I'm really not sure how you could set up such a retrieval scheme however without at least receiving and using the value from the Content-Length header. There are status messages that I would think would be critical as well. Without these you'd have to make assumptions that would likely fail.

As I believe you know, the HTTP 1.1 RFC is here: ftp://ftp.isi.edu/in-notes/rfc2616.txt

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

................

As I believe you know, the HTTP 1.1 RFC is here: ftp://ftp.isi.edu/in-notes/rfc2616.txt

Dale

Thinks Dale ! As usual, you are helpful (merci !)

so there is no way to tell remote server to send a http_reponse without header (?),ok . so the only way to have the repnse in one packet is to send a httpget with a header Accept-Encoding: gzip.

in the other hand , if we consider time consuming by compress (server side) and uncompress (client side) routines, there is no benefice comparing to a http_request without compress...

mybe i have to it directly in raw socket ( delphi, or c code)

if you have idea about how to optimaze this mecanism, please let me know, and here my project:

while 1
          $html=HttpGet($url)  ; Thinking about the better implementation of an HttpGet (high speed function)

                IF StringInStr($html, "Fire Now") Then

                            Do_the_Job()

                             ExitLoop
               EndIf
WEnd

Share this post


Link to post
Share on other sites

Thinks Dale ! As usual, you are helpful (merci !)

pas de quoi

mybe i have to it directly in raw socket ( delphi, or c code)

I don't know how using another language would help you. An HTTP server responds to a limited command vocabulary - the language that sends the request cannot change that. I think that all you can do is work to make tossing away the unwanted header inforamtion as efficient as possible.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0