Skip to content

Commit fc343f1

Browse files
author
Vlad Stefan Munteanu
committed
Removed mentions of NPN
1 parent e03df25 commit fc343f1

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

docs/source/negotiating-http2.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ Negotiating HTTP/2
55

66
.. _starting-alpn:
77

8-
HTTPS URLs (ALPN and NPN)
8+
HTTPS URLs (ALPN)
99
-------------------------
1010

11-
Starting HTTP/2 for HTTPS URLs is outlined in `RFC 7540 Section 3.3`_. In this case, the client and server use a TLS extension to negotiate HTTP/2: typically either or both of `NPN`_ or `ALPN`_. How to use NPN and ALPN is currently not covered in this document: please consult the documentation for either the :mod:`ssl module <python:ssl>` in the standard library, or the :mod:`PyOpenSSL <pyopenssl:OpenSSL.SSL>` third-party modules, for more on this topic.
11+
Starting HTTP/2 for HTTPS URLs is outlined in `RFC 7540 Section 3.3`_. In this case, the client and server use a TLS extension to negotiate HTTP/2: `ALPN`_. How to use ALPN is currently not covered in this document: please consult the documentation for either the :mod:`ssl module <python:ssl>` in the standard library, or the :mod:`PyOpenSSL <pyopenssl:OpenSSL.SSL>` third-party modules, for more on this topic.
1212

1313
This method is the simplest to use once the TLS connection is established. To use it with Hyper-h2, after you've established the connection and confirmed that HTTP/2 has been negotiated with `ALPN`_, create a :class:`H2Connection <h2.connection.H2Connection>` object and call :meth:`H2Connection.initiate_connection <h2.connection.H2Connection.initiate_connection>`. This will ensure that the appropriate preamble data is placed in the data buffer. You should then immediately send the data returned by :meth:`H2Connection.data_to_send <h2.connection.H2Connection.data_to_send>` on your TLS connection.
1414

1515
At this point, you're free to use all the HTTP/2 functionality provided by Hyper-h2.
1616

1717
.. note::
18-
Although Hyper-h2 is not concerned with negotiating protocol versions, it is important to note that support for `NPN`_ and `ALPN`_ extensions is not available in the standard library of Python versions < 2.7.9.
18+
Although Hyper-h2 is not concerned with negotiating protocol versions, it is important to note that support for `ALPN`_ is not available in the standard library of Python versions < 2.7.9.
1919
As a consequence, clients may encounter various errors due to protocol versions mismatch.
2020

2121
Server Setup Example
@@ -94,11 +94,10 @@ The code below demonstrates how to handle a plaintext upgrade from the perspecti
9494
Prior Knowledge
9595
---------------
9696

97-
It's possible that you as a client know that a particular server supports HTTP/2, and that you do not need to perform any of the negotiations described above. In that case, you may follow the steps in :ref:`starting-alpn`, ignoring all references to ALPN and NPN: there's no need to perform the upgrade dance described in :ref:`starting-upgrade`.
97+
It's possible that you as a client know that a particular server supports HTTP/2, and that you do not need to perform any of the negotiations described above. In that case, you may follow the steps in :ref:`starting-alpn`, ignoring all references to ALPN: there's no need to perform the upgrade dance described in :ref:`starting-upgrade`.
9898

9999
.. _RFC 7540: https://tools.ietf.org/html/rfc7540
100100
.. _RFC 7540 Section 3.2: https://tools.ietf.org/html/rfc7540#section-3.2
101101
.. _RFC 7540 Section 3.3: https://tools.ietf.org/html/rfc7540#section-3.3
102-
.. _NPN: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation
103102
.. _ALPN: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation
104103
.. _RFC 7230 Section 6.7: https://tools.ietf.org/html/rfc7230#section-6.7

0 commit comments

Comments
 (0)