Re: HTTP Download complete detect using TCP sniffer



Well, each HTTP response has a Content-length header
so you know how much data to expect back. Parsing the
original HTML page will tell you which resources will
the client request so you can start ticking them off as they
arrive. The page is complete when all resources from
its HTML have been received. You have to parse the
Content-type as well, since the original request may
return something other than HTML, and the subsequent
requests may also return nested HTML (for example
a frameset and individual frames).

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

"fdryan" <fdryan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:77058A3F-57F9-4EC5-8A4F-45D29428A396@xxxxxxxxxxxxxxxx
A timeout would have the advantage of simplicity and certainly would
overcome
the SSL HTTPS challenge. However the disadvantage would be that a timer
would be too slow when connection speeds are fast indicating a "Done"
later
than need be. When connection speeds are slow a timer could be too fast
indicating a premature "Done". Ignoring HTTPS for now, what in the "HTML
+
HTTP parsing" would tell me the HTTP download is complete please?


"Alexander Nickolov" wrote:

Well, the best you can do is with a little timeout. Since HTTP
is half-duplex, you always know when the client is requesting
by the fact it's sending data. When the request is sent you start
receiving data until the server is finished before the next request
is placed. Using a timeout after the last packet processed you
will know that either the download is finished, or the server
is hosed and won't send any more data. Alas, distinguishing
between the two is impossible without HTML + HTTP parsing...
BTW, you can't parse HTTPS since it's encrypted.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

"fdryan" <fdryan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:451D9CB6-EB0F-4DE0-B9B2-CB1CF98DE4E0@xxxxxxxxxxxxxxxx
Thank you both for the suggestions. Reading the status codes, while it
shows
download progress, does not give me a "download done". A HTTP page
could
have multiple 200's as images and other content is downloaded. I want
to
avoid HTML parsing if possible as then I get into the whole decoding
the
GZIP
content thing and anyway I don't see how that would help me anyway. I
want
to determine the "download complete" at the packet level if at all
possible.

"Vladimir Scherbina" wrote:

Arkady,

I guess, implementing HTML parser/analyzer is not what OP wants ;)

To OP: In HTTP protocol there are status codes that actually maps to
some
well-known states, for example, 200 is "OK", 404 is "Not Found", etc.
So
you
can anaylize the HTTP protocol in sniffer in order to track the
requests
and
their status codes.

--
Vladimir (Windows SDK MVP)

"Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
news:OHZ4cosEHHA.4024@xxxxxxxxxxxxxxxxxxxxxxx
You need to read HTML tags for that
Arkady

"fdryan" <fdryan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:37BF2735-FBB0-4456-8138-C3C64E738A66@xxxxxxxxxxxxxxxx
I have a functioning TCP/IP sniffer operating in promiscous mode and
I
can
see the traffic between my machine (client) and the server. I can
see
the
packet traffic, the 3 way SYN handshake, and the sequence and
acknowledge
numbers as the download proceeds no problem. There is no "FIN"
here
as
the
connection is "kept alive". How do I determine, as soon as
possible,
that a
typical web page HTTP(S) Download is complete?









.



Relevant Pages

  • Re: How to write something to a html textfield and send it?
    ... > added to it (look below for html). ... I've never had any desire to automate a browser, ... agent to post the request and retrieve the response. ... Most non-trivial HTML forms use HTTP POST requests. ...
    (comp.programming)
  • Re: that preload swf files question again ...
    ... download the swf files. ... As you back-tracked through the HTTP specification from the 206 response to the Range and If-Range headers you will have noticed that this sample of the HTTP traffic was too far down stream of be informative. ... The request that Firefox initially decided not to cache was the first one it made to the server; the one with the 200 response. ... When I make that request the only header returned that is likely to have an impact on the cache-ability of the resource was the Last-Modified header. ...
    (comp.lang.javascript)
  • Re: HTTP Download complete detect using TCP sniffer
    ... When the request is sent you start ... between the two is impossible without HTML + HTTP parsing... ... download progress, does not give me a "download done". ... see the traffic between my machine (client) and the server. ...
    (microsoft.public.win32.programmer.networks)
  • Re: urlencode and $_GET
    ... URL delimits an HTML reference to a named anchor, whereas %23 does not, it's treated as part of the query string in the HTTP GET request; ... In the context of a clicked hyperlink, these exact characters are transmitted in the corresponding HTTP GET request string. ... mean it to be a delimiter for an HTML anchor identifier. ...
    (comp.lang.php)
  • Re: Is this possible with .NET?
    ... I'm making a web page so html and javascript over http is ... > send a request to the server. ...
    (microsoft.public.dotnet.languages.csharp)

Quantcast