METADATA 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. Metadata-Version: 2.0
  2. Name: hpack
  3. Version: 3.0.0
  4. Summary: Pure-Python HPACK header compression
  5. Home-page: http://hyper.rtfd.org
  6. Author: Cory Benfield
  7. Author-email: cory@lukasa.co.uk
  8. License: MIT License
  9. Platform: UNKNOWN
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Intended Audience :: Developers
  12. Classifier: License :: OSI Approved :: MIT License
  13. Classifier: Programming Language :: Python
  14. Classifier: Programming Language :: Python :: 2
  15. Classifier: Programming Language :: Python :: 2.7
  16. Classifier: Programming Language :: Python :: 3
  17. Classifier: Programming Language :: Python :: 3.3
  18. Classifier: Programming Language :: Python :: 3.4
  19. Classifier: Programming Language :: Python :: 3.5
  20. Classifier: Programming Language :: Python :: 3.6
  21. Classifier: Programming Language :: Python :: Implementation :: CPython
  22. ========================================
  23. hpack: HTTP/2 Header Encoding for Python
  24. ========================================
  25. .. image:: https://raw.github.com/Lukasa/hyper/development/docs/source/images/hyper.png
  26. .. image:: https://travis-ci.org/python-hyper/hpack.png?branch=master
  27. :target: https://travis-ci.org/python-hyper/hpack
  28. This module contains a pure-Python HTTP/2 header encoding (HPACK) logic for use
  29. in Python programs that implement HTTP/2. It also contains a compatibility
  30. layer that automatically enables the use of ``nghttp2`` if it's available.
  31. Documentation
  32. =============
  33. Documentation is available at http://python-hyper.org/hpack/.
  34. Contributing
  35. ============
  36. ``hpack`` welcomes contributions from anyone! Unlike many other projects we are
  37. happy to accept cosmetic contributions and small contributions, in addition to
  38. large feature requests and changes.
  39. Before you contribute (either by opening an issue or filing a pull request),
  40. please `read the contribution guidelines`_.
  41. .. _read the contribution guidelines: http://hyper.readthedocs.org/en/development/contributing.html
  42. License
  43. =======
  44. ``hpack`` is made available under the MIT License. For more details, see the
  45. ``LICENSE`` file in the repository.
  46. Authors
  47. =======
  48. ``hpack`` is maintained by Cory Benfield, with contributions from others. For
  49. more details about the contributors, please see ``CONTRIBUTORS.rst``.
  50. Release History
  51. ===============
  52. 3.0.0 (2017-03-29)
  53. ------------------
  54. **API Changes (Backward Incompatible)**
  55. - Removed nghttp2 support. This support had rotted and was essentially
  56. non-functional, so it has now been removed until someone has time to re-add
  57. the support in a functional form.
  58. - Attempts by the encoder to exceed the maximum allowed header table size via
  59. dynamic table size updates (or the absence thereof) are now forbidden.
  60. **API Changes (Backward Compatible)**
  61. - Added a new ``InvalidTableSizeError`` thrown when the encoder does not
  62. respect the maximum table size set by the user.
  63. - Added a ``Decoder.max_allowed_table_size`` field that sets the maximum
  64. allowed size of the decoder header table. See the documentation for an
  65. indication of how this should be used.
  66. **Bugfixes**
  67. - Up to 25% performance improvement decoding HPACK-packed integers, depending
  68. on the platform.
  69. - HPACK now tolerates receiving multiple header table size changes in sequence,
  70. rather than only one.
  71. - HPACK now forbids header table size changes anywhere but first in a header
  72. block, as required by RFC 7541 § 4.2.
  73. - Other miscellaneous performance improvements.
  74. 2.3.0 (2016-08-04)
  75. ------------------
  76. **Security Fixes**
  77. - CVE-2016-6581: HPACK Bomb. This release now enforces a maximum value of the
  78. decompressed size of the header list. This is to avoid the so-called "HPACK
  79. Bomb" vulnerability, which is caused when a malicious peer sends a compressed
  80. HPACK body that decompresses to a gigantic header list size.
  81. This also adds a ``OversizedHeaderListError``, which is thrown by the
  82. ``decode`` method if the maximum header list size is being violated. This
  83. places the HPACK decoder into a broken state: it must not be used after this
  84. exception is thrown.
  85. This also adds a ``max_header_list_size`` to the ``Decoder`` object. This
  86. controls the maximum allowable decompressed size of the header list. By
  87. default this is set to 64kB.
  88. 2.2.0 (2016-04-20)
  89. ------------------
  90. **API Changes (Backward Compatible)**
  91. - Added ``HeaderTuple`` and ``NeverIndexedHeaderTuple`` classes that signal
  92. whether a given header field may ever be indexed in HTTP/2 header
  93. compression.
  94. - Changed ``Decoder.decode()`` to return the newly added ``HeaderTuple`` class
  95. and subclass. These objects behave like two-tuples, so this change does not
  96. break working code.
  97. **Bugfixes**
  98. - Improve Huffman decoding speed by 4x using an approach borrowed from nghttp2.
  99. - Improve HPACK decoding speed by 10% by caching header table sizes.
  100. 2.1.1 (2016-03-16)
  101. ------------------
  102. **Bugfixes**
  103. - When passing a dictionary or dictionary subclass to ``Encoder.encode``, HPACK
  104. now ensures that HTTP/2 special headers (headers whose names begin with
  105. ``:`` characters) appear first in the header block.
  106. 2.1.0 (2016-02-02)
  107. ------------------
  108. **API Changes (Backward Compatible)**
  109. - Added new ``InvalidTableIndex`` exception, a subclass of
  110. ``HPACKDecodingError``.
  111. - Instead of throwing ``IndexError`` when encountering invalid encoded integers
  112. HPACK now throws ``HPACKDecodingError``.
  113. - Instead of throwing ``UnicodeDecodeError`` when encountering headers that are
  114. not UTF-8 encoded, HPACK now throws ``HPACKDecodingError``.
  115. - Instead of throwing ``IndexError`` when encountering invalid table offsets,
  116. HPACK now throws ``InvalidTableIndex``.
  117. - Added ``raw`` flag to ``decode``, allowing ``decode`` to return bytes instead
  118. of attempting to decode the headers as UTF-8.
  119. **Bugfixes**
  120. - ``memoryview`` objects are now used when decoding HPACK, improving the
  121. performance by avoiding unnecessary data copies.
  122. 2.0.1 (2015-11-09)
  123. ------------------
  124. - Fixed a bug where the Python HPACK implementation would only emit header
  125. table size changes for the total change between one header block and another,
  126. rather than for the entire sequence of changes.
  127. 2.0.0 (2015-10-12)
  128. ------------------
  129. - Remove unused ``HPACKEncodingError``.
  130. - Add the shortcut ability to import the public API (``Encoder``, ``Decoder``,
  131. ``HPACKError``, ``HPACKDecodingError``) directly, rather than from
  132. ``hpack.hpack``.
  133. 1.1.0 (2015-07-07)
  134. ------------------
  135. - Add support for emitting 'never indexed' header fields, by using an optional
  136. third element in the header tuple. With thanks to @jimcarreer!
  137. 1.0.1 (2015-04-19)
  138. ------------------
  139. - Header fields that have names matching header table entries are now added to
  140. the header table. This improves compression efficiency at the cost of
  141. slightly more table operations. With thanks to `Tatsuhiro Tsujikawa`_.
  142. .. _Tatsuhiro Tsujikawa: https://github.com/tatsuhiro-t
  143. 1.0.0 (2015-04-13)
  144. ------------------
  145. - Initial fork of the code from `hyper`_.
  146. .. _hyper: https://hyper.readthedocs.org/