Ticket #297: 297.diff

File 297.diff, 5.4 KB (added by julian.reschke@…, 8 years ago)

Proposed patch

  • p1-messaging.xml

     
    26342634   request is in progress.
    26352635</t>
    26362636<t>
    2637    This means that clients, servers, and proxies &MUST; be able to recover
    2638    from asynchronous close events. Client software &SHOULD; reopen the
    2639    transport connection and retransmit the aborted sequence of requests
    2640    without user interaction so long as the request sequence is
    2641    idempotent (see &idempotent-methods;). Non-idempotent request methods or sequences
    2642    &MUST-NOT; be automatically retried, although user agents &MAY; offer a
    2643    human operator the choice of retrying the request(s). Confirmation by
    2644    user-agent software with semantic understanding of the application
    2645    &MAY; substitute for user confirmation. The automatic retry &SHOULD-NOT;
    2646    be repeated if the second sequence of requests fails.
    2647 </t>
    2648 <t>
    26492637   Servers &SHOULD; always respond to at least one request per connection,
    26502638   if at all possible. Servers &SHOULD-NOT;  close a connection in the
    26512639   middle of transmitting a response, unless a network or client failure
     
    26752663   excessive number of connections from a client.
    26762664</t>
    26772665</section>
     2666
     2667<section title="Retrying Requests" anchor="persistent.retrying.requests">
     2668<t>
     2669   Senders can close the transport connection at any time. Therefore,
     2670   clients, servers, and proxies &MUST; be able to recover
     2671   from asynchronous close events. Client software &MAY; reopen the
     2672   transport connection and retransmit the aborted sequence of requests
     2673   without user interaction so long as the request sequence is
     2674   idempotent (see &idempotent-methods;). Non-idempotent request methods or sequences
     2675   &MUST-NOT; be automatically retried, although user agents &MAY; offer a
     2676   human operator the choice of retrying the request(s). Confirmation by
     2677   user-agent software with semantic understanding of the application
     2678   &MAY; substitute for user confirmation. The automatic retry &SHOULD-NOT;
     2679   be repeated if the second sequence of requests fails.
     2680</t>
    26782681</section>
    26792682
     2683</section>
     2684
    26802685<section title="Message Transmission Requirements" anchor="message.transmission.requirements">
    26812686
    26822687<section title="Persistent Connections and Flow Control" anchor="persistent.flow">
     
    28122817</t>
    28132818</section>
    28142819
    2815 <section title="Client Behavior if Server Prematurely Closes Connection" anchor="connection.premature">
    2816 <t>
    2817    If an HTTP/1.1 client sends a request which includes a request body,
    2818    but which does not include an Expect header field with the
    2819    "100-continue" expectation, and if the client is not directly
    2820    connected to an HTTP/1.1 origin server, and if the client sees the
    2821    connection close before receiving a status line from the server, the
    2822    client &SHOULD; retry the request.  If the client does retry this
    2823    request, it &MAY; use the following "binary exponential backoff"
    2824    algorithm to be assured of obtaining a reliable response:
    2825   <list style="numbers">
    2826     <t>
    2827       Initiate a new connection to the server
    2828     </t>
    2829     <t>
    2830       Transmit the request-line, header fields, and the CRLF that
    2831       indicates the end of header fields.
    2832     </t>
    2833     <t>
    2834       Initialize a variable R to the estimated round-trip time to the
    2835          server (e.g., based on the time it took to establish the
    2836          connection), or to a constant value of 5 seconds if the round-trip
    2837          time is not available.
    2838     </t>
    2839     <t>
    2840        Compute T = R * (2**N), where N is the number of previous
    2841          retries of this request.
    2842     </t>
    2843     <t>
    2844        Wait either for an error response from the server, or for T
    2845          seconds (whichever comes first)
    2846     </t>
    2847     <t>
    2848        If no error response is received, after T seconds transmit the
    2849          body of the request.
    2850     </t>
    2851     <t>
    2852        If client sees that the connection is closed prematurely,
    2853          repeat from step 1 until the request is accepted, an error
    2854          response is received, or the user becomes impatient and
    2855          terminates the retry process.
    2856     </t>
    2857   </list>
    2858 </t>
    2859 <t>
    2860    If at any point an error status code is received, the client
    2861   <list style="symbols">
    2862       <t>&SHOULD-NOT;  continue and</t>
    2863 
    2864       <t>&SHOULD; close the connection if it has not completed sending the
    2865         request message.</t>
    2866     </list>
    2867 </t>
    28682820</section>
    28692821</section>
    2870 </section>
    28712822
    28722823
    28732824<section title="Miscellaneous notes that might disappear" anchor="misc">
     
    50204971</t>
    50214972<t>
    50224973  Remove hard limit of two connections per server.
     4974  Remove requirement to retry a sequence of requests as long it was idempotent.
    50234975  (<xref target="persistent.practical"/>)
    50244976</t>
    50254977<t>
     4978  Remove requirement to retry requests under certain cirumstances when the
     4979  server prematurely closes the connection.
     4980  (<xref target="message.transmission.requirements"/>)
     4981</t>
     4982<t>
    50264983  Change ABNF productions for header fields to only define the field value.
    50274984  (<xref target="header.field.definitions"/>)
    50284985</t>
     
    58885845      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/219"/>:
    58895846      "Revise Acknowledgements Sections"
    58905847    </t>
     5848    <t>
     5849      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/297"/>:
     5850      "Retrying Requests"
     5851    </t>
    58915852  </list>
    58925853</t>
    58935854</section>