Ignore:
Timestamp:
Mar 9, 2012, 12:46:33 AM (8 years ago)
Author:
fielding@…
Message:

#250 message-body in CONNECT response

Change message body parsing of successful CONNECT responses such that
the tunnel begins immediately after the header block, as implemented in
practice, and any Content-Length or Transfer-Encoding is ignored.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p2-semantics.xml

    r1567 r1570  
    12951295<t>
    12961296   The CONNECT method requests that the proxy establish a tunnel
    1297    to the request-target and then restrict its behavior to blind
    1298    forwarding of packets until the connection is closed.
     1297   to the request-target and, if successful, thereafter restrict its behavior
     1298   to blind forwarding of packets until the connection is closed.
    12991299</t>
    13001300<t>
     
    13101310</artwork></figure>
    13111311<t>
    1312    Other HTTP mechanisms can be used normally with the CONNECT method &mdash;
    1313    except end-to-end protocol Upgrade requests, since the
    1314    tunnel must be established first.
    1315 </t>
    1316 <t>
    1317    For example, proxy authentication might be used to establish the
     1312   Any successful (2xx) response to a CONNECT request indicates that the
     1313   proxy has established a connection to the requested host and port,
     1314   and has switched to tunneling the current connection to that server
     1315   connection.
     1316   The tunneled data from the server begins immediately after the blank line
     1317   that concludes the successful response's header block.
     1318   A server &SHOULD-NOT; send any Transfer-Encoding or Content-Length
     1319   header fields in a successful response.
     1320   A client &MUST; ignore any Content-Length or Transfer-Encoding header
     1321   fields received in a successful response.
     1322</t>
     1323<t>
     1324   Any response other than a successful response indicates that the tunnel
     1325   has not yet been formed and that the connection remains governed by HTTP.
     1326</t>
     1327<t>
     1328   Proxy authentication might be used to establish the
    13181329   authority to create a tunnel:
    13191330</t>
     
    13251336</artwork></figure>
    13261337<t>
    1327    Bodies on CONNECT requests have no defined semantics. Note that sending a body
    1328    on a CONNECT request might cause some existing implementations to reject the
    1329    request.
    1330 </t>
    1331 <t>
    1332    Like any other pipelined HTTP/1.1 request, data to be tunnel may be
    1333    sent immediately after the blank line. The usual caveats also apply:
     1338   A message body on a CONNECT request has no defined semantics. Sending a
     1339   body on a CONNECT request might cause existing implementations to reject
     1340   the request.
     1341</t>
     1342<t>
     1343   Similar to a pipelined HTTP/1.1 request, data to be tunneled from client
     1344   to server &MAY; be sent immediately after the request (before a response
     1345   is received). The usual caveats also apply:
    13341346   data may be discarded if the eventual response is negative, and the
    13351347   connection may be reset with no response if more than one TCP segment
    13361348   is outstanding.
    1337 </t>
    1338 
    1339 <section title="Establishing a Tunnel with CONNECT">
    1340 <t>
    1341    Any successful (2xx) response to a CONNECT request indicates that the
    1342    proxy has established a connection to the requested host and port,
    1343    and has switched to tunneling the current connection to that server
    1344    connection.
    13451349</t>
    13461350<t>
     
    13531357</t>
    13541358<t>
    1355    An origin server which receives a CONNECT request for itself &MAY;
    1356    respond with a 2xx status code to indicate that a connection is
    1357    established.
    1358 </t>
    1359 <t>
    13601359   If at any point either one of the peers gets disconnected, any
    13611360   outstanding data that came from that peer will be passed to the other
     
    13641363   that data will be discarded.
    13651364</t>
    1366 
    1367 </section>
     1365<t>
     1366   An origin server which receives a CONNECT request for itself &MAY;
     1367   respond with a 2xx status code to indicate that a connection is
     1368   established.  However, most origin servers do not implement CONNECT.
     1369</t>
    13681370</section>
    13691371</section>
Note: See TracChangeset for help on using the changeset viewer.