TCP and HTTP related question - what happens when I click Web browser 'STOP' button - PLEASE HELP - TCP-IP

This is a discussion on TCP and HTTP related question - what happens when I click Web browser 'STOP' button - PLEASE HELP - TCP-IP ; Could some protocols guru please help? Suppose I have a Web browser running. I start to download a page, and then before that is complete, I click on the browser 'Stop' button. What message (e.g., TCP RST) would be generated ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: TCP and HTTP related question - what happens when I click Web browser 'STOP' button - PLEASE HELP

  1. TCP and HTTP related question - what happens when I click Web browser 'STOP' button - PLEASE HELP

    Could some protocols guru please help? Suppose I have a Web browser
    running. I start to download a page, and then before that is complete,
    I click on the browser 'Stop' button. What message (e.g., TCP RST)
    would be generated by this action? Would it generate a HTTP FIN
    message? Could someone please clarify this a bit? Thanks in advance
    for your help.


  2. Re: TCP and HTTP related question - what happens when I click Web browser 'STOP' button - PLEASE HELP

    In article <1181777177.659923.191620@g37g2000prf.googlegroups. com>,
    "cpptutor2000@yahoo.com" wrote:

    > Could some protocols guru please help? Suppose I have a Web browser
    > running. I start to download a page, and then before that is complete,
    > I click on the browser 'Stop' button. What message (e.g., TCP RST)
    > would be generated by this action? Would it generate a HTTP FIN
    > message? Could someone please clarify this a bit? Thanks in advance
    > for your help.


    I'm not sure there's a specific standard for this, but I believe most
    applications simply close the connection. This will cause a FIN to be
    sent immediately, and an RST to be sent in response to any segments
    received from the server.

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

  3. Re: TCP and HTTP related question - what happens when I click Web browser 'STOP' button - PLEASE HELP

    Barry Margolin wrote:
    > I'm not sure there's a specific standard for this, but I believe most
    > applications simply close the connection. This will cause a FIN to be
    > sent immediately, and an RST to be sent in response to any segments
    > received from the server.


    Unless the client is (properly?) written to use shutdown(SHUT_WR) and
    then drain any arriving data to the platform equivalent of /dev/null
    before calling close().

    rick jones
    --
    a wide gulf separates "what if" from "if only"
    these opinions are mine, all mine; HP might not want them anyway...
    feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...

  4. Re: TCP and HTTP related question - what happens when I click Webbrowser 'STOP' button - PLEASE HELP

    Rick Jones writes:

    > Barry Margolin wrote:
    >> I'm not sure there's a specific standard for this, but I believe most
    >> applications simply close the connection. This will cause a FIN to be
    >> sent immediately, and an RST to be sent in response to any segments
    >> received from the server.

    >
    > Unless the client is (properly?) written to use shutdown(SHUT_WR) and
    > then drain any arriving data to the platform equivalent of /dev/null
    > before calling close().


    Why would the app do that when the user told it not to? The whole
    point of the stop button is to avoid wasting bandwidth, CPU cycles,
    and time on data that is no longer wanted, yet you're suggesting that
    a proper implementation should go ahead and waste all three, anyway.
    -don

  5. Re: TCP and HTTP related question - what happens when I click Web browser 'STOP' button - PLEASE HELP

    don provan wrote:
    > Rick Jones writes:


    > > Barry Margolin wrote:
    > >> I'm not sure there's a specific standard for this, but I believe
    > >> most applications simply close the connection. This will cause a
    > >> FIN to be sent immediately, and an RST to be sent in response to
    > >> any segments received from the server.

    > >
    > > Unless the client is (properly?) written to use shutdown(SHUT_WR)
    > > and then drain any arriving data to the platform equivalent of
    > > /dev/null before calling close().


    > Why would the app do that when the user told it not to?


    The user has said that he is no longer interested in seeing the data.
    He hasn't said that the browser has to make that happen in one way or
    another.

    > The whole point of the stop button is to avoid wasting bandwidth,
    > CPU cycles, and time on data that is no longer wanted, yet you're
    > suggesting that a proper implementation should go ahead and waste
    > all three, anyway.


    Because TCP does not have an "application requested abort" mechanism,
    just the RST mechanism, which bypasses/nullifies/etc TIME_WAIT.

    rick jones
    --
    denial, anger, bargaining, depression, acceptance, rebirth...
    where do you want to be today?
    these opinions are mine, all mine; HP might not want them anyway...
    feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...

  6. Re: TCP and HTTP related question - what happens when I click Web browser 'STOP' button - PLEASE HELP

    In article ,
    Rick Jones wrote:

    > don provan wrote:
    > > Rick Jones writes:

    >
    > > > Barry Margolin wrote:
    > > >> I'm not sure there's a specific standard for this, but I believe
    > > >> most applications simply close the connection. This will cause a
    > > >> FIN to be sent immediately, and an RST to be sent in response to
    > > >> any segments received from the server.
    > > >
    > > > Unless the client is (properly?) written to use shutdown(SHUT_WR)
    > > > and then drain any arriving data to the platform equivalent of
    > > > /dev/null before calling close().

    >
    > > Why would the app do that when the user told it not to?

    >
    > The user has said that he is no longer interested in seeing the data.
    > He hasn't said that the browser has to make that happen in one way or
    > another.


    No, he hasn't. But it would be silly to let the server continue spewing
    data that isn't wanted.

    Unfortunately, HTTP doesn't have any way to tell the server "don't
    bother sending anything more". The only mechanism available is the TCP
    RST.

    As I said in my original response, there's no standard that requires a
    particular mechanism. But I'll bet most browsers do what I said.

    It's basically the same thing that would happen if you ran wget or curl
    from a CLI and then ctr-C'ed it before the response was received.

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

  7. Re: TCP and HTTP related question - what happens when I click Webbrowser 'STOP' button - PLEASE HELP

    Barry Margolin д:
    > In article <1181777177.659923.191620@g37g2000prf.googlegroups. com>,
    > "cpptutor2000@yahoo.com" wrote:
    >
    >> Could some protocols guru please help? Suppose I have a Web browser
    >> running. I start to download a page, and then before that is complete,
    >> I click on the browser 'Stop' button. What message (e.g., TCP RST)
    >> would be generated by this action? Would it generate a HTTP FIN
    >> message? Could someone please clarify this a bit? Thanks in advance
    >> for your help.

    >
    > I'm not sure there's a specific standard for this, but I believe most
    > applications simply close the connection. This will cause a FIN to be
    > sent immediately, and an RST to be sent in response to any segments
    > received from the server.
    >

    Firefox in opensuse10.2 do this.I use wireshark capture the
    packets.and saw that.

  8. Re: TCP and HTTP related question - what happens when I click Web browser 'STOP' button - PLEASE HELP

    > > The user has said that he is no longer interested in seeing the
    > > data. He hasn't said that the browser has to make that happen in
    > > one way or another.


    > No, he hasn't. But it would be silly to let the server continue
    > spewing data that isn't wanted.


    > Unfortunately, HTTP doesn't have any way to tell the server "don't
    > bother sending anything more". The only mechanism available is the
    > TCP RST.


    Which, unless there are updated RFC's being followed, nukes the
    protection of TIME_WAIT. Maybe I'm just full of fear uncertainty and
    doubt, but it seems that this "relaxed" attitude towards
    triggering RSTs is one day going to rear-up and bite someone really
    hard on the backside.

    > As I said in my original response, there's no standard that requires
    > a particular mechanism. But I'll bet most browsers do what I said.


    I suspect they do.

    rick jones
    --
    No need to believe in either side, or any side. There is no cause.
    There's only yourself. The belief is in your own precision. - Jobert
    these opinions are mine, all mine; HP might not want them anyway...
    feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...

+ Reply to Thread