From 139f93b3040329b8ac4ca56b1926b934a30af85b Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Sun, 10 Mar 2024 12:33:00 +1300 Subject: [PATCH] Modernize gem. (#7) * Restore all contributors (as much as is possible with automation). --- .contributors.yaml | 1342 +++++++++++++++++ .editorconfig | 3 + .github/workflows/coverage.yaml | 57 + .github/workflows/documentation.yaml | 58 + .github/workflows/test-external.yaml | 37 + .github/workflows/test.yaml | 51 + .gitignore | 11 +- .travis.yml | 20 - Gemfile | 6 - README.md | 84 -- gems.rb | 24 + lib/protocol/hpack.rb | 21 +- lib/protocol/hpack/compressor.rb | 31 +- lib/protocol/hpack/context.rb | 24 +- lib/protocol/hpack/decompressor.rb | 22 +- lib/protocol/hpack/error.rb | 22 +- lib/protocol/hpack/huffman.rb | 26 +- lib/protocol/hpack/huffman/machine.rb | 22 +- lib/protocol/hpack/version.rb | 21 +- license.md | 35 + protocol-hpack.gemspec | 33 +- readme.md | 68 + release.cert | 28 + spec/protocol/hpack/compressor/header_spec.rb | 22 +- spec/protocol/hpack/compressor_spec.rb | 29 +- spec/protocol/hpack/context_spec.rb | 22 +- spec/protocol/hpack/decompressor_spec.rb | 22 +- spec/protocol/hpack/external_spec.rb | 26 +- spec/protocol/hpack/failures_spec.rb | 113 ++ spec/protocol/hpack/huffman_spec.rb | 24 +- spec/protocol/hpack/rfc7541/dump.rb | 3 + spec/protocol/hpack/rfc7541_spec.rb | 5 +- spec/protocol/hpack_spec.rb | 21 +- spec/spec_helper.rb | 3 + tasks/huffman.rb | 31 +- 35 files changed, 1914 insertions(+), 453 deletions(-) create mode 100644 .contributors.yaml create mode 100644 .github/workflows/coverage.yaml create mode 100644 .github/workflows/documentation.yaml create mode 100644 .github/workflows/test-external.yaml create mode 100644 .github/workflows/test.yaml delete mode 100644 .travis.yml delete mode 100644 Gemfile delete mode 100644 README.md create mode 100644 gems.rb create mode 100644 license.md create mode 100644 readme.md create mode 100644 release.cert create mode 100644 spec/protocol/hpack/failures_spec.rb diff --git a/.contributors.yaml b/.contributors.yaml new file mode 100644 index 0000000..3856b2d --- /dev/null +++ b/.contributors.yaml @@ -0,0 +1,1342 @@ +--- +# This file was generated using the following configuration: +# +# bake \ +# modernize:contributors:extract --root ../../tmp/http-2 --paths \ +# lib/http/2/huffman.rb \ +# lib/http/2/huffman_statemachine.rb \ +# lib/tasks/generate_huffman_table.rb \ +# lib/http/2/compressor.rb \ +# spec/compressor_spec.rb \ +# spec/huffman_spec.rb \ +# spec/hpack_test_spec.rb \ +# \; \ +# modernize:contributors:map lib/http/2/huffman.rb lib/protocol/hpack/huffman.rb \ +# modernize:contributors:map lib/http/2/huffman_statemachine.rb lib/protocol/hpack/machine.rb \ +# modernize:contributors:map lib/tasks/generate_huffman_table.rb tasks/huffman.rb \ +# modernize:contributors:map lib/http/2/compressor.rb lib/protocol/hpack/compressor.rb \ +# modernize:contributors:map spec/compressor_spec.rb spec/protocol/hpack/compressor_spec.rb \ +# modernize:contributors:map spec/huffman_spec.rb spec/protocol/hpack/huffman_spec.rb \ +# modernize:contributors:map spec/hpack_test_spec.rb spec/protocol/hpack/external_spec.rb \ +# output --format yaml > .contributors.yaml +# +- id: a770b5aa7f43da809b20e2112cc707d5d2c7bfde + time: &1 2013-08-05 06:12:06.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-04 11:12:06.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: a770b5aa7f43da809b20e2112cc707d5d2c7bfde + time: *1 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-04 11:12:06.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 74cd2f7ca49255a8500c9223432db08a7682d828 + time: &2 2013-08-05 08:15:50.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-04 13:15:50.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 74cd2f7ca49255a8500c9223432db08a7682d828 + time: *2 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-04 13:15:50.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 342682f0ebfc7855ff5d09fd14fa08ddc88e3e77 + time: &3 2013-08-05 09:42:12.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-04 14:42:12.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 342682f0ebfc7855ff5d09fd14fa08ddc88e3e77 + time: *3 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-04 14:42:12.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 53e3ac3cb8fad6273cb9c16a1906e5e51b1fe04f + time: 2013-08-05 09:48:01.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-04 14:48:01.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: dc344fdf51cd5e0913a3caa82b487845ff8be309 + time: &4 2013-08-05 11:25:07.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-04 16:25:07.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: dc344fdf51cd5e0913a3caa82b487845ff8be309 + time: *4 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-04 16:25:07.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 82a805eab2f187ad951f473db3551bf3ed1f13ee + time: &5 2013-08-05 14:54:59.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-04 19:54:59.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 82a805eab2f187ad951f473db3551bf3ed1f13ee + time: *5 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-04 19:54:59.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 794d5d8e4248aa2ed35c22964fadadef5782df16 + time: &6 2013-08-06 05:54:33.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-05 10:54:33.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 794d5d8e4248aa2ed35c22964fadadef5782df16 + time: *6 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-05 10:54:33.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 3b3eb5ffa9d1d69e03e1dae33eb4d100e27e2e3e + time: &7 2013-08-06 07:07:40.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-05 12:07:40.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 3b3eb5ffa9d1d69e03e1dae33eb4d100e27e2e3e + time: *7 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-05 12:07:40.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: c6fb1221cfa6523ce146861cc820ca6df91126d6 + time: &8 2013-08-09 21:11:18.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-07 11:54:08.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: c6fb1221cfa6523ce146861cc820ca6df91126d6 + time: *8 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-07 11:54:08.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 6ad5dbc2b9ff78de7f81881321445ab98b2b9742 + time: &9 2013-08-09 21:15:31.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-09 12:15:31.000000000 +03:00 + original_path: lib/http/2/compressor.rb +- id: 6ad5dbc2b9ff78de7f81881321445ab98b2b9742 + time: *9 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-09 12:15:31.000000000 +03:00 + original_path: spec/compressor_spec.rb +- id: 0adecb782257a87899967514cc2e10fb8bc44ae5 + time: &10 2013-08-09 21:49:04.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-09 12:49:04.000000000 +03:00 + original_path: lib/http/2/compressor.rb +- id: 0adecb782257a87899967514cc2e10fb8bc44ae5 + time: *10 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-09 12:49:04.000000000 +03:00 + original_path: spec/compressor_spec.rb +- id: fa23caeb9cd2e8ace64c5779c06f35667a051fa6 + time: &11 2013-08-09 22:31:53.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-09 13:31:53.000000000 +03:00 + original_path: lib/http/2/compressor.rb +- id: fa23caeb9cd2e8ace64c5779c06f35667a051fa6 + time: *11 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-09 13:31:53.000000000 +03:00 + original_path: spec/compressor_spec.rb +- id: 6c35fb1ed1ac062315ba4d7bdaa8c34cba3bd45c + time: 2013-08-09 22:39:46.000000000 +12:00 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-09 13:37:39.000000000 +03:00 + original_path: spec/compressor_spec.rb +- id: 2c5c26b27573905d86348a2cdb906451a009209e + time: 2013-08-09 22:52:39.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-09 13:52:39.000000000 +03:00 + original_path: lib/http/2/compressor.rb +- id: 90907e4b066cbff552f26d977525ecbc467221bb + time: 2013-08-09 22:52:59.000000000 +12:00 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-09 13:52:59.000000000 +03:00 + original_path: spec/compressor_spec.rb +- id: 71c7f951a0fd50c5f08822f74de945754f6b32aa + time: &12 2013-08-11 00:09:48.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-10 15:07:28.000000000 +03:00 + original_path: lib/http/2/compressor.rb +- id: 71c7f951a0fd50c5f08822f74de945754f6b32aa + time: *12 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-10 15:07:28.000000000 +03:00 + original_path: spec/compressor_spec.rb +- id: b7b3c6d36085bf5cd0aceeef4a3be84f57dee635 + time: &13 2013-08-11 18:47:38.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-11 09:47:38.000000000 +03:00 + original_path: lib/http/2/compressor.rb +- id: b7b3c6d36085bf5cd0aceeef4a3be84f57dee635 + time: *13 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-11 09:47:38.000000000 +03:00 + original_path: spec/compressor_spec.rb +- id: 9a30c488f33369343dc1d203ed8acb8f15510c6e + time: &14 2013-08-12 01:10:55.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-11 16:10:55.000000000 +03:00 + original_path: lib/http/2/compressor.rb +- id: 9a30c488f33369343dc1d203ed8acb8f15510c6e + time: *14 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-11 16:10:55.000000000 +03:00 + original_path: spec/compressor_spec.rb +- id: fd497ef03fd17f0137469f766e6b657084aeadd8 + time: 2013-08-12 01:12:14.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-11 16:12:14.000000000 +03:00 + original_path: lib/http/2/compressor.rb +- id: e13865455833725e526497f6b149d0f9ef84bc8d + time: &15 2013-08-12 01:26:36.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-11 16:26:36.000000000 +03:00 + original_path: lib/http/2/compressor.rb +- id: e13865455833725e526497f6b149d0f9ef84bc8d + time: *15 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-11 16:26:36.000000000 +03:00 + original_path: spec/compressor_spec.rb +- id: 26f5e147ac6bf88edd0081f2dccabc3b1a593b2e + time: &16 2013-08-16 19:31:36.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-16 10:31:36.000000000 +03:00 + original_path: lib/http/2/compressor.rb +- id: 26f5e147ac6bf88edd0081f2dccabc3b1a593b2e + time: *16 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-16 10:31:36.000000000 +03:00 + original_path: spec/compressor_spec.rb +- id: a0b5ed2ff4fa2fb7b49636c8abcbe2995f845ccf + time: &17 2013-08-22 17:53:13.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-21 22:53:13.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: a0b5ed2ff4fa2fb7b49636c8abcbe2995f845ccf + time: *17 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-08-21 22:53:13.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: b60d9ebd92819dbda512b92831c4f3f085f4d807 + time: 2013-09-16 06:53:50.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-15 11:53:50.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: ec7a1c1b445202cbb6282fc109711dcd615af594 + time: &18 2013-09-16 07:22:20.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-15 12:22:20.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: ec7a1c1b445202cbb6282fc109711dcd615af594 + time: *18 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-15 12:22:20.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 4320b917782754cd5d3e9d19427ebe7735f505ee + time: 2013-09-16 11:56:55.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-15 16:56:55.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: dead2480320016e93fd78dabc3c0ce13a9fcc20f + time: &19 2013-09-21 12:07:23.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-20 20:02:25.000000000 -04:00 + original_path: lib/http/2/compressor.rb +- id: dead2480320016e93fd78dabc3c0ce13a9fcc20f + time: *19 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-20 20:02:25.000000000 -04:00 + original_path: spec/compressor_spec.rb +- id: d6cc3c870c7fd1ce30ce18077ace57d7b80c8db8 + time: &20 2013-09-21 15:12:38.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-20 23:12:38.000000000 -04:00 + original_path: lib/http/2/compressor.rb +- id: d6cc3c870c7fd1ce30ce18077ace57d7b80c8db8 + time: *20 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-20 23:12:38.000000000 -04:00 + original_path: spec/compressor_spec.rb +- id: baf36371943320e9d34307b6bff1d735bd26c19f + time: 2013-09-24 05:27:28.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-23 10:27:28.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 103322a7a65248b48f0b86b99152572516b657dc + time: 2013-09-25 17:50:19.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-24 22:50:19.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: e7816a8347a571b283487acd3c6880b729561013 + time: 2013-09-26 04:22:12.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-25 09:22:12.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: f1861baadce59365ed4ab04993f1e211b88fd9ed + time: &21 2013-09-28 06:17:04.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-25 22:01:08.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 27d9072028c85dcb8a607f4482e74199eaf8c936 + time: &22 2013-09-28 06:17:04.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-25 22:13:58.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 993cb2038c3813d3962f9dfac25b9b3761bea004 + time: 2013-09-28 06:17:04.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-25 22:56:44.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 8f1e3822c07d09f59c1394fbe2b37c41d6e9c1c6 + time: &23 2013-09-28 06:17:04.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-25 23:23:53.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 4097ac14e311cfd9e63c428efbd3ca2fde5d42ce + time: &24 2013-09-28 06:17:04.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-27 11:06:18.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: f1861baadce59365ed4ab04993f1e211b88fd9ed + time: *21 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-25 22:01:08.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 27d9072028c85dcb8a607f4482e74199eaf8c936 + time: *22 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-25 22:13:58.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 8f1e3822c07d09f59c1394fbe2b37c41d6e9c1c6 + time: *23 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-25 23:23:53.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 4097ac14e311cfd9e63c428efbd3ca2fde5d42ce + time: *24 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-09-27 11:06:18.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 9e67f6090b66b5cdb72cec1605cf55f804830078 + time: &25 2013-10-10 06:45:58.000000000 +13:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-10-09 10:45:46.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 9e67f6090b66b5cdb72cec1605cf55f804830078 + time: *25 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2013-10-09 10:45:46.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: d7b739eef94d4af30ec01841e34581e208c40c36 + time: &26 2014-10-08 15:08:39.000000000 +13:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-22 17:42:22.000000000 +09:00 + original_path: lib/http/2/huffman.rb +- id: d7b739eef94d4af30ec01841e34581e208c40c36 + time: *26 + path: lib/protocol/hpack/machine.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-22 17:42:22.000000000 +09:00 + original_path: lib/http/2/huffman_statemachine.rb +- id: d7b739eef94d4af30ec01841e34581e208c40c36 + time: *26 + path: tasks/huffman.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-22 17:42:22.000000000 +09:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: d7b739eef94d4af30ec01841e34581e208c40c36 + time: *26 + path: lib/protocol/hpack/compressor.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-22 17:42:22.000000000 +09:00 + original_path: lib/http/2/compressor.rb +- id: f3329279f8819e7d8bcc500c98495c3de3e8c592 + time: 2014-10-08 15:08:39.000000000 +13:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-26 18:50:36.000000000 +09:00 + original_path: lib/http/2/compressor.rb +- id: b48673edc75132af45f57928f61289dcf4acd150 + time: &27 2014-10-08 15:08:39.000000000 +13:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-26 18:51:45.000000000 +09:00 + original_path: lib/http/2/compressor.rb +- id: f105f1f3a9d40d4565e0c4cb85b3f5e569db6351 + time: 2014-10-08 15:08:39.000000000 +13:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-26 18:59:03.000000000 +09:00 + original_path: lib/http/2/compressor.rb +- id: 4322322dbb9fefd824beda958e6c237b302a3ba9 + time: 2014-10-08 15:08:39.000000000 +13:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-26 19:10:54.000000000 +09:00 + original_path: lib/http/2/compressor.rb +- id: 6f79ea4f11a4e0581f4c73a2fe729cdab79d1f98 + time: 2014-10-08 15:08:39.000000000 +13:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-26 19:23:51.000000000 +09:00 + original_path: lib/http/2/compressor.rb +- id: 20d0de1c2efadca42c2e0a7bc5f8c235d9ba754c + time: 2014-10-08 15:08:39.000000000 +13:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-29 17:37:47.000000000 +09:00 + original_path: lib/http/2/compressor.rb +- id: d7b739eef94d4af30ec01841e34581e208c40c36 + time: *26 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-22 17:42:22.000000000 +09:00 + original_path: spec/compressor_spec.rb +- id: b48673edc75132af45f57928f61289dcf4acd150 + time: *27 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-26 18:51:45.000000000 +09:00 + original_path: spec/compressor_spec.rb +- id: d7b739eef94d4af30ec01841e34581e208c40c36 + time: *26 + path: spec/protocol/hpack/huffman_spec.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-22 17:42:22.000000000 +09:00 + original_path: spec/huffman_spec.rb +- id: d7b739eef94d4af30ec01841e34581e208c40c36 + time: *26 + path: spec/protocol/hpack/external_spec.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-09-22 17:42:22.000000000 +09:00 + original_path: spec/hpack_test_spec.rb +- id: 5e639c178c47841bf6b99727840e31c36177ac91 + time: &28 2014-10-22 21:26:41.000000000 +13:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-10-22 15:18:50.000000000 +09:00 + original_path: lib/http/2/compressor.rb +- id: 5e639c178c47841bf6b99727840e31c36177ac91 + time: *28 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-10-22 15:18:50.000000000 +09:00 + original_path: spec/compressor_spec.rb +- id: 5e639c178c47841bf6b99727840e31c36177ac91 + time: *28 + path: spec/protocol/hpack/external_spec.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2014-10-22 15:18:50.000000000 +09:00 + original_path: spec/hpack_test_spec.rb +- id: da622d24ffe3abb46c9fb81bac6818d3ef902191 + time: &29 2014-10-23 03:43:01.000000000 +13:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2014-10-22 07:43:01.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: da622d24ffe3abb46c9fb81bac6818d3ef902191 + time: *29 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2014-10-22 07:43:01.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: da622d24ffe3abb46c9fb81bac6818d3ef902191 + time: *29 + path: spec/protocol/hpack/external_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2014-10-22 07:43:01.000000000 -07:00 + original_path: spec/hpack_test_spec.rb +- id: 232e51826d53ca390e6c51f8b557996f9fd8a1ec + time: &30 2015-01-26 19:24:42.000000000 +13:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2015-01-26 15:24:42.000000000 +09:00 + original_path: lib/http/2/huffman.rb +- id: 232e51826d53ca390e6c51f8b557996f9fd8a1ec + time: *30 + path: lib/protocol/hpack/compressor.rb + author: + name: Kaoru Maeda + email: maeda@lepidum.co.jp + time: 2015-01-26 15:24:42.000000000 +09:00 + original_path: lib/http/2/compressor.rb +- id: f443c386b1fd7b29a054e6a0d79457ac5278e152 + time: &31 2015-02-04 04:46:10.000000000 +13:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2015-02-03 07:46:10.000000000 -08:00 + original_path: lib/http/2/huffman.rb +- id: f443c386b1fd7b29a054e6a0d79457ac5278e152 + time: *31 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2015-02-03 07:46:10.000000000 -08:00 + original_path: lib/http/2/compressor.rb +- id: f99b716067b27071fe92f0b632c0fd783d4d122c + time: &32 2015-03-10 07:43:43.000000000 +13:00 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Tamir Duberstein + email: tamird@squareup.com + time: 2014-10-03 21:24:24.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: f99b716067b27071fe92f0b632c0fd783d4d122c + time: *32 + path: spec/protocol/hpack/huffman_spec.rb + author: + name: Tamir Duberstein + email: tamird@squareup.com + time: 2014-10-03 21:24:24.000000000 -07:00 + original_path: spec/huffman_spec.rb +- id: f99b716067b27071fe92f0b632c0fd783d4d122c + time: *32 + path: spec/protocol/hpack/external_spec.rb + author: + name: Tamir Duberstein + email: tamird@squareup.com + time: 2014-10-03 21:24:24.000000000 -07:00 + original_path: spec/hpack_test_spec.rb +- id: 4411352447a559ff7bafadba04a2bfd28d826b6b + time: &33 2015-04-07 04:57:52.000000000 +12:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 09:40:25.000000000 -07:00 + original_path: lib/http/2/huffman.rb +- id: 4411352447a559ff7bafadba04a2bfd28d826b6b + time: *33 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 09:40:25.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 38246e3b94f1f7885ad1454f5ce24ea6d20ddba3 + time: &34 2015-04-07 04:57:53.000000000 +12:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Tamir Duberstein + email: tamird@squareup.com + time: 2014-10-03 22:09:48.000000000 -07:00 + original_path: lib/http/2/huffman.rb +- id: 38246e3b94f1f7885ad1454f5ce24ea6d20ddba3 + time: *34 + path: tasks/huffman.rb + author: + name: Tamir Duberstein + email: tamird@squareup.com + time: 2014-10-03 22:09:48.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: 38246e3b94f1f7885ad1454f5ce24ea6d20ddba3 + time: *34 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@squareup.com + time: 2014-10-03 22:09:48.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 38246e3b94f1f7885ad1454f5ce24ea6d20ddba3 + time: *34 + path: spec/protocol/hpack/huffman_spec.rb + author: + name: Tamir Duberstein + email: tamird@squareup.com + time: 2014-10-03 22:09:48.000000000 -07:00 + original_path: spec/huffman_spec.rb +- id: 38246e3b94f1f7885ad1454f5ce24ea6d20ddba3 + time: *34 + path: spec/protocol/hpack/external_spec.rb + author: + name: Tamir Duberstein + email: tamird@squareup.com + time: 2014-10-03 22:09:48.000000000 -07:00 + original_path: spec/hpack_test_spec.rb +- id: f061f985ecc3992692e9ecd0043b85764f1d2750 + time: &35 2015-04-07 05:00:10.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 09:56:02.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: f061f985ecc3992692e9ecd0043b85764f1d2750 + time: *35 + path: spec/protocol/hpack/huffman_spec.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 09:56:02.000000000 -07:00 + original_path: spec/huffman_spec.rb +- id: f061f985ecc3992692e9ecd0043b85764f1d2750 + time: *35 + path: spec/protocol/hpack/external_spec.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 09:56:02.000000000 -07:00 + original_path: spec/hpack_test_spec.rb +- id: 9d4fa4ba5db7ba3c2056de30196c7e9ff9be6292 + time: &36 2015-04-07 05:01:18.000000000 +12:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 08:58:31.000000000 -07:00 + original_path: lib/http/2/huffman.rb +- id: 9d4fa4ba5db7ba3c2056de30196c7e9ff9be6292 + time: *36 + path: tasks/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 08:58:31.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: 9d4fa4ba5db7ba3c2056de30196c7e9ff9be6292 + time: *36 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 08:58:31.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 9d4fa4ba5db7ba3c2056de30196c7e9ff9be6292 + time: *36 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 08:58:31.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 75da4126da4cdae5acc93d4a63c43c16bb221830 + time: &37 2015-04-07 05:02:35.000000000 +12:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-04-05 11:30:55.000000000 -07:00 + original_path: lib/http/2/huffman.rb +- id: 75da4126da4cdae5acc93d4a63c43c16bb221830 + time: *37 + path: lib/protocol/hpack/machine.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-04-05 11:30:55.000000000 -07:00 + original_path: lib/http/2/huffman_statemachine.rb +- id: 75da4126da4cdae5acc93d4a63c43c16bb221830 + time: *37 + path: tasks/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-04-05 11:30:55.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: 75da4126da4cdae5acc93d4a63c43c16bb221830 + time: *37 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-04-05 11:30:55.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 75da4126da4cdae5acc93d4a63c43c16bb221830 + time: *37 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-04-05 11:30:55.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 75da4126da4cdae5acc93d4a63c43c16bb221830 + time: *37 + path: spec/protocol/hpack/huffman_spec.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-04-05 11:30:55.000000000 -07:00 + original_path: spec/huffman_spec.rb +- id: 62b9ae5b7a7f37d4b23006bafd25733fd3bfd90d + time: 2015-04-07 05:02:36.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 09:47:04.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 36ccce1da2555fc69f910c89b3f2b13b310610ed + time: 2015-04-07 05:02:36.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 10:20:07.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 9c9f7a8fa261bed360befc7e37a21a142db3b51e + time: 2015-04-07 05:02:36.000000000 +12:00 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 09:50:14.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 5d1be5b49e4ae78c5ebce6b2d8024218bf99edbb + time: &38 2015-04-07 05:03:21.000000000 +12:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:29:36.000000000 -07:00 + original_path: lib/http/2/huffman.rb +- id: 4d6b33913582202053e9048237b14a03809e6a0d + time: 2015-04-07 05:03:21.000000000 +12:00 + path: tasks/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:05:52.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: 5d1be5b49e4ae78c5ebce6b2d8024218bf99edbb + time: *38 + path: tasks/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:29:36.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: 00cafeafbe8a15df642f7e864f87ade6607613f9 + time: 2015-04-07 05:03:21.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 10:52:43.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: c899aa54d62b1f151fbc1ed6ee3882160d526f64 + time: 2015-04-07 05:03:21.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:02:00.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 236b584c3e47576d4f167be11e0f8f7966bc3b74 + time: 2015-04-07 05:03:21.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-04-05 11:20:35.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: ba437d4eea80ff30fac071d7d59348e64375a1c0 + time: &39 2015-04-07 05:29:15.000000000 +12:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:37:45.000000000 -07:00 + original_path: lib/http/2/huffman.rb +- id: ba437d4eea80ff30fac071d7d59348e64375a1c0 + time: *39 + path: tasks/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:37:45.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: ba437d4eea80ff30fac071d7d59348e64375a1c0 + time: *39 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:37:45.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: ba437d4eea80ff30fac071d7d59348e64375a1c0 + time: *39 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:37:45.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: ba437d4eea80ff30fac071d7d59348e64375a1c0 + time: *39 + path: spec/protocol/hpack/external_spec.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:37:45.000000000 -07:00 + original_path: spec/hpack_test_spec.rb +- id: d5c52f091145ecd996bdc99a90de1659f2a72cfc + time: &40 2015-04-07 05:29:17.000000000 +12:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:41:47.000000000 -07:00 + original_path: lib/http/2/huffman.rb +- id: 31b7b20328ef2dd28427d76af1865a409eea2e88 + time: &41 2015-04-07 05:29:17.000000000 +12:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-17 08:46:25.000000000 -07:00 + original_path: lib/http/2/huffman.rb +- id: a9bfd7da578fd32d8761af7f7aa6334153a0d58b + time: &42 2015-04-07 05:29:17.000000000 +12:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-31 22:38:35.000000000 -07:00 + original_path: lib/http/2/huffman.rb +- id: d5c52f091145ecd996bdc99a90de1659f2a72cfc + time: *40 + path: lib/protocol/hpack/machine.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:41:47.000000000 -07:00 + original_path: lib/http/2/huffman_statemachine.rb +- id: 31b7b20328ef2dd28427d76af1865a409eea2e88 + time: *41 + path: lib/protocol/hpack/machine.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-17 08:46:25.000000000 -07:00 + original_path: lib/http/2/huffman_statemachine.rb +- id: d5c52f091145ecd996bdc99a90de1659f2a72cfc + time: *40 + path: tasks/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:41:47.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: 31b7b20328ef2dd28427d76af1865a409eea2e88 + time: *41 + path: tasks/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-17 08:46:25.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: a9bfd7da578fd32d8761af7f7aa6334153a0d58b + time: *42 + path: tasks/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-31 22:38:35.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: 5888ff9e92da6b7e1fcb0a55f36493637259a3d9 + time: &43 2015-04-07 05:29:17.000000000 +12:00 + path: tasks/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-31 23:39:10.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: d5c52f091145ecd996bdc99a90de1659f2a72cfc + time: *40 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:41:47.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 31b7b20328ef2dd28427d76af1865a409eea2e88 + time: *41 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-17 08:46:25.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: a9bfd7da578fd32d8761af7f7aa6334153a0d58b + time: *42 + path: lib/protocol/hpack/compressor.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-31 22:38:35.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: d5c52f091145ecd996bdc99a90de1659f2a72cfc + time: *40 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:41:47.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 5888ff9e92da6b7e1fcb0a55f36493637259a3d9 + time: *43 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-31 23:39:10.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: d5c52f091145ecd996bdc99a90de1659f2a72cfc + time: *40 + path: spec/protocol/hpack/huffman_spec.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:41:47.000000000 -07:00 + original_path: spec/huffman_spec.rb +- id: d5c52f091145ecd996bdc99a90de1659f2a72cfc + time: *40 + path: spec/protocol/hpack/external_spec.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-03-09 11:41:47.000000000 -07:00 + original_path: spec/hpack_test_spec.rb +- id: 3e321a4649ea1f5969ff47dc9ba3ba3ad2d3d057 + time: &44 2015-04-07 05:36:15.000000000 +12:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-04-05 09:27:22.000000000 -07:00 + original_path: lib/http/2/huffman.rb +- id: 3e321a4649ea1f5969ff47dc9ba3ba3ad2d3d057 + time: *44 + path: lib/protocol/hpack/machine.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-04-05 09:27:22.000000000 -07:00 + original_path: lib/http/2/huffman_statemachine.rb +- id: 3e321a4649ea1f5969ff47dc9ba3ba3ad2d3d057 + time: *44 + path: tasks/huffman.rb + author: + name: Tamir Duberstein + email: tamird@gmail.com + time: 2015-04-05 09:27:22.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: 46986316b71af8910cc8d5d3da0621edb0db2ff2 + time: &45 2015-04-08 15:11:51.000000000 +12:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2015-04-07 20:11:51.000000000 -07:00 + original_path: lib/http/2/huffman.rb +- id: 46986316b71af8910cc8d5d3da0621edb0db2ff2 + time: *45 + path: lib/protocol/hpack/machine.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2015-04-07 20:11:51.000000000 -07:00 + original_path: lib/http/2/huffman_statemachine.rb +- id: 46986316b71af8910cc8d5d3da0621edb0db2ff2 + time: *45 + path: tasks/huffman.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2015-04-07 20:11:51.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: 46986316b71af8910cc8d5d3da0621edb0db2ff2 + time: *45 + path: lib/protocol/hpack/compressor.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2015-04-07 20:11:51.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 46986316b71af8910cc8d5d3da0621edb0db2ff2 + time: *45 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2015-04-07 20:11:51.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 46986316b71af8910cc8d5d3da0621edb0db2ff2 + time: *45 + path: spec/protocol/hpack/huffman_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2015-04-07 20:11:51.000000000 -07:00 + original_path: spec/huffman_spec.rb +- id: 46986316b71af8910cc8d5d3da0621edb0db2ff2 + time: *45 + path: spec/protocol/hpack/external_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2015-04-07 20:11:51.000000000 -07:00 + original_path: spec/hpack_test_spec.rb +- id: 6087ef4f5a71e13537301a027e22e00036168c05 + time: 2015-12-28 10:30:29.000000000 +13:00 + path: spec/protocol/hpack/external_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2015-12-27 13:29:27.000000000 -08:00 + original_path: spec/hpack_test_spec.rb +- id: 90203574be3e22e32f0edfbdc296e092add24261 + time: 2015-12-28 13:51:55.000000000 +13:00 + path: spec/protocol/hpack/external_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2015-12-27 16:51:55.000000000 -08:00 + original_path: spec/hpack_test_spec.rb +- id: 4d01d584584404154831c503875970e4c293880a + time: 2016-02-27 16:39:27.000000000 +13:00 + path: spec/protocol/hpack/external_spec.rb + author: + name: Kien Nguyen Trung + email: trungkien2288@gmail.com + time: 2016-02-27 10:39:27.000000000 +07:00 + original_path: spec/hpack_test_spec.rb +- id: 3bf07b9e4643b50aee5f6ace5c4ca9cf31723bab + time: 2016-02-28 13:48:16.000000000 +13:00 + path: spec/protocol/hpack/external_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2016-02-27 16:48:16.000000000 -08:00 + original_path: spec/hpack_test_spec.rb +- id: 19102297bb11b7ce166a49119dae82732182af6a + time: 2016-06-10 03:24:37.000000000 +12:00 + path: spec/protocol/hpack/external_spec.rb + author: + name: Ilya Grigorik + email: ilya@igvita.com + time: 2016-06-09 11:24:37.000000000 -04:00 + original_path: spec/hpack_test_spec.rb +- id: f7dc3d656c51b6ea730501e1b3c64d2bb59e75a2 + time: &46 2016-10-13 04:23:53.000000000 +13:00 + path: tasks/huffman.rb + author: + name: George Ulmer + email: george@boost-media.com + time: 2016-10-12 08:23:53.000000000 -07:00 + original_path: lib/tasks/generate_huffman_table.rb +- id: f7dc3d656c51b6ea730501e1b3c64d2bb59e75a2 + time: *46 + path: lib/protocol/hpack/compressor.rb + author: + name: George Ulmer + email: george@boost-media.com + time: 2016-10-12 08:23:53.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: '08d1a3dcade1ae39f4598e0d4e1622fde13bb014' + time: 2018-01-10 18:41:27.000000000 +13:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Tiago Cardoso + email: cardoso_tiago@hotmail.com + time: 2018-01-10 05:41:27.000000000 +00:00 + original_path: lib/http/2/compressor.rb +- id: 4047315ccab1d450a2fc202362cdac87b21d8b07 + time: 2018-01-11 18:51:19.000000000 +13:00 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Tiago Cardoso + email: cardoso_tiago@hotmail.com + time: 2018-01-11 05:51:19.000000000 +00:00 + original_path: spec/compressor_spec.rb +- id: 1cb2518fa338c56c2c1feecddbba3ca933f66718 + time: &47 2018-07-24 07:42:28.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Byron Formwalt + email: byronformwalt@users.noreply.github.com + time: 2018-07-23 12:42:28.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 1cb2518fa338c56c2c1feecddbba3ca933f66718 + time: *47 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Byron Formwalt + email: byronformwalt@users.noreply.github.com + time: 2018-07-23 12:42:28.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: 9b4a4cee5a0736d57b245bab63b7d23d8ee4fb31 + time: &48 2018-08-16 07:55:21.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Kenichi Nakamura + email: kenichi.nakamura@gmail.com + time: 2018-08-15 12:55:21.000000000 -07:00 + original_path: lib/http/2/compressor.rb +- id: 9b4a4cee5a0736d57b245bab63b7d23d8ee4fb31 + time: *48 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Kenichi Nakamura + email: kenichi.nakamura@gmail.com + time: 2018-08-15 12:55:21.000000000 -07:00 + original_path: spec/compressor_spec.rb +- id: '0549edf8987da8d2b9948597a1e6b2d9c090d7aa' + time: &49 2019-03-05 19:05:20.000000000 +13:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Jingyi Chen + email: chejingy@amazon.com + time: 2019-03-04 22:05:20.000000000 -08:00 + original_path: lib/http/2/compressor.rb +- id: '0549edf8987da8d2b9948597a1e6b2d9c090d7aa' + time: *49 + path: spec/protocol/hpack/compressor_spec.rb + author: + name: Jingyi Chen + email: chejingy@amazon.com + time: 2019-03-04 22:05:20.000000000 -08:00 + original_path: spec/compressor_spec.rb +- id: a9cde3c871572459ee8ce158076f6d63d53f1306 + time: 2020-08-15 03:17:47.000000000 +12:00 + path: lib/protocol/hpack/compressor.rb + author: + name: Justin Mazzocchi + email: 2831158+jzzocc@users.noreply.github.com + time: 2020-08-14 11:17:47.000000000 -04:00 + original_path: lib/http/2/compressor.rb +- id: '059ec0cc3a3647e542bf4ff93fd1216f26fd8844' + time: 2022-09-21 10:45:52.000000000 +12:00 + path: lib/protocol/hpack/huffman.rb + author: + name: Daniel Morrison + email: daniel@collectiveidea.com + time: 2022-09-20 18:45:52.000000000 -04:00 + original_path: lib/http/2/huffman.rb diff --git a/.editorconfig b/.editorconfig index 269d98a..a6e7d26 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,3 +4,6 @@ root = true indent_style = tab indent_size = 2 +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml new file mode 100644 index 0000000..68adbf2 --- /dev/null +++ b/.github/workflows/coverage.yaml @@ -0,0 +1,57 @@ +name: Coverage + +on: [push, pull_request] + +permissions: + contents: read + +env: + CONSOLE_OUTPUT: XTerm + COVERAGE: PartialSummary + +jobs: + test: + name: ${{matrix.ruby}} on ${{matrix.os}} + runs-on: ${{matrix.os}}-latest + + strategy: + matrix: + os: + - ubuntu + - macos + + ruby: + - "3.3" + + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{matrix.ruby}} + bundler-cache: true + + - name: Run tests + timeout-minutes: 5 + run: bundle exec bake test + + - uses: actions/upload-artifact@v3 + with: + name: coverage-${{matrix.os}}-${{matrix.ruby}} + path: .covered.db + + validate: + needs: test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3" + bundler-cache: true + + - uses: actions/download-artifact@v3 + + - name: Validate coverage + timeout-minutes: 5 + run: bundle exec bake covered:validate --paths */.covered.db \; diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml new file mode 100644 index 0000000..8dc5227 --- /dev/null +++ b/.github/workflows/documentation.yaml @@ -0,0 +1,58 @@ +name: Documentation + +on: + push: + branches: + - main + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages: +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment: +concurrency: + group: "pages" + cancel-in-progress: true + +env: + CONSOLE_OUTPUT: XTerm + BUNDLE_WITH: maintenance + +jobs: + generate: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3" + bundler-cache: true + + - name: Installing packages + run: sudo apt-get install wget + + - name: Generate documentation + timeout-minutes: 5 + run: bundle exec bake utopia:project:static --force no + + - name: Upload documentation artifact + uses: actions/upload-pages-artifact@v2 + with: + path: docs + + deploy: + runs-on: ubuntu-latest + + environment: + name: github-pages + url: ${{steps.deployment.outputs.page_url}} + + needs: generate + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v3 diff --git a/.github/workflows/test-external.yaml b/.github/workflows/test-external.yaml new file mode 100644 index 0000000..18efa2c --- /dev/null +++ b/.github/workflows/test-external.yaml @@ -0,0 +1,37 @@ +name: Test External + +on: [push, pull_request] + +permissions: + contents: read + +env: + CONSOLE_OUTPUT: XTerm + +jobs: + test: + name: ${{matrix.ruby}} on ${{matrix.os}} + runs-on: ${{matrix.os}}-latest + + strategy: + matrix: + os: + - ubuntu + - macos + + ruby: + - "3.0" + - "3.1" + - "3.2" + - "3.3" + + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{matrix.ruby}} + bundler-cache: true + + - name: Run tests + timeout-minutes: 10 + run: bundle exec bake test:external diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..1dca864 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,51 @@ +name: Test + +on: [push, pull_request] + +permissions: + contents: read + +env: + CONSOLE_OUTPUT: XTerm + +jobs: + test: + name: ${{matrix.ruby}} on ${{matrix.os}} + runs-on: ${{matrix.os}}-latest + continue-on-error: ${{matrix.experimental}} + + strategy: + matrix: + os: + - ubuntu + - macos + + ruby: + - "3.0" + - "3.1" + - "3.2" + - "3.3" + + experimental: [false] + + include: + - os: ubuntu + ruby: truffleruby + experimental: true + - os: ubuntu + ruby: jruby + experimental: true + - os: ubuntu + ruby: head + experimental: true + + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{matrix.ruby}} + bundler-cache: true + + - name: Run tests + timeout-minutes: 10 + run: bundle exec bake test diff --git a/.gitignore b/.gitignore index 74d0244..43d7aa9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,9 @@ /.bundle/ -/.yardoc -/_yardoc/ -/coverage/ -/doc/ /pkg/ -/spec/reports/ -/tmp/ +/gems.locked +/.covered.db +/external # rspec failure tracking .rspec_status -Gemfile.lock \ No newline at end of file +/gems.locked diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 856719e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: ruby -dist: xenial -cache: bundler - -matrix: - include: - - rvm: 2.4 - - rvm: 2.5 - - rvm: 2.6 - - rvm: 2.7 - - rvm: 2.6 - env: COVERAGE=PartialSummary,Coveralls - - rvm: truffleruby - - rvm: jruby-head - env: JRUBY_OPTS="--debug -X+O" - - rvm: ruby-head - allow_failures: - - rvm: truffleruby - - rvm: ruby-head - - rvm: jruby-head diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 653b464..0000000 --- a/Gemfile +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -source "https://rubygems.org" - -# Specify your gem's dependencies in protocol-hpack.gemspec -gemspec diff --git a/README.md b/README.md deleted file mode 100644 index 40de022..0000000 --- a/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# Protocol::HPACK - -Provides a compressor and decompressor for HTTP 2.0 headers, HPACK, as defined by [RFC7541](https://tools.ietf.org/html/rfc7541). - -[![Build Status](https://travis-ci.com/socketry/protocol-hpack.svg?branch=master)](https://travis-ci.com/socketry/protocol-hpack) -[![Coverage Status](https://coveralls.io/repos/github/socketry/protocol-hpack/badge.svg?branch=master)](https://coveralls.io/github/socketry/protocol-hpack?branch=master) - -## Installation - -Add this line to your application's Gemfile: - -```ruby -gem 'protocol-hpack' -``` - -And then execute: - - $ bundle - -Or install it yourself as: - - $ gem install protocol-hpack - -## Usage - -### Compressing Headers - -```ruby -require 'protocol/hpack' - -buffer = String.new.b -compressor = Protocol::HPACK::Compressor.new(buffer) - -compressor.encode([['content-length', '5']]) -=> "\\\x015" -``` - -### Decompressing Headers - -Reusing `buffer` from above: - -```ruby -require 'protocol/hpack' - -# Buffer from above... -buffer = "\\\x015" -decompressor = Protocol::HPACK::Decompressor.new(buffer) - -decompressor.decode -=> [["content-length", "5"]] -``` - -## Contributing - -1. Fork it -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create new Pull Request - -## License - -Released under the MIT license. - -Copyright, 2019, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams). -Copyright, 2013, by Ilya Grigorik. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/gems.rb b/gems.rb new file mode 100644 index 0000000..682b68b --- /dev/null +++ b/gems.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. + +source "https://rubygems.org" + +# Specify your gem's dependencies in protocol-hpack.gemspec +gemspec + +gem "rake", "~> 10.0" + +group :test do + gem "rspec", "~> 3.0" + gem "covered" + + gem "bake-test" + gem "bake-test-external" +end + +group :maintenance, optional: true do + gem "bake-gem" + gem "bake-modernize" +end diff --git a/lib/protocol/hpack.rb b/lib/protocol/hpack.rb index 55735dc..790432b 100644 --- a/lib/protocol/hpack.rb +++ b/lib/protocol/hpack.rb @@ -1,24 +1,7 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. require_relative "hpack/version" diff --git a/lib/protocol/hpack/compressor.rb b/lib/protocol/hpack/compressor.rb index 6e38769..1711538 100644 --- a/lib/protocol/hpack/compressor.rb +++ b/lib/protocol/hpack/compressor.rb @@ -1,25 +1,16 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# Copyrigh, 2013, by Ilya Grigorik. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2013-2015, by Ilya Grigorik. +# Copyright, 2014-2015, by Kaoru Maeda. +# Copyright, 2015, by Tamir Duberstein. +# Copyright, 2016, by George Ulmer. +# Copyright, 2018, by Tiago Cardoso. +# Copyright, 2018, by Byron Formwalt. +# Copyright, 2018-2024, by Samuel Williams. +# Copyright, 2018, by Kenichi Nakamura. +# Copyright, 2019, by Jingyi Chen. +# Copyright, 2020, by Justin Mazzocchi. require_relative 'context' require_relative 'huffman' diff --git a/lib/protocol/hpack/context.rb b/lib/protocol/hpack/context.rb index a99ebbd..bd1b989 100644 --- a/lib/protocol/hpack/context.rb +++ b/lib/protocol/hpack/context.rb @@ -1,25 +1,7 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# Copyrigh, 2013, by Ilya Grigorik. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. require_relative 'huffman' @@ -299,7 +281,7 @@ def change_table_size(size) # Returns current table size in octets # @return [Integer] def current_table_size - @table.inject(0) {|r, (k, v)| r + k.bytesize + v.bytesize + 32} + @table.sum{|k, v| k.bytesize + v.bytesize + 32} end private diff --git a/lib/protocol/hpack/decompressor.rb b/lib/protocol/hpack/decompressor.rb index 2c0ce2a..ddd6c8b 100644 --- a/lib/protocol/hpack/decompressor.rb +++ b/lib/protocol/hpack/decompressor.rb @@ -1,25 +1,7 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# Copyrigh, 2013, by Ilya Grigorik. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. require_relative 'context' require_relative 'huffman' diff --git a/lib/protocol/hpack/error.rb b/lib/protocol/hpack/error.rb index f82c137..b0cabd9 100644 --- a/lib/protocol/hpack/error.rb +++ b/lib/protocol/hpack/error.rb @@ -1,25 +1,7 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# Copyrigh, 2013, by Ilya Grigorik. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2019-2024, by Samuel Williams. module Protocol module HPACK diff --git a/lib/protocol/hpack/huffman.rb b/lib/protocol/hpack/huffman.rb index f0b49da..45f1ee8 100644 --- a/lib/protocol/hpack/huffman.rb +++ b/lib/protocol/hpack/huffman.rb @@ -1,25 +1,11 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# Copyrigh, 2013, by Ilya Grigorik. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2014-2015, by Kaoru Maeda. +# Copyright, 2015, by Ilya Grigorik. +# Copyright, 2015, by Tamir Duberstein. +# Copyright, 2018-2024, by Samuel Williams. +# Copyright, 2022, by Daniel Morrison. require_relative 'huffman/machine' require_relative 'error' diff --git a/lib/protocol/hpack/huffman/machine.rb b/lib/protocol/hpack/huffman/machine.rb index c3e4333..f6dd32b 100644 --- a/lib/protocol/hpack/huffman/machine.rb +++ b/lib/protocol/hpack/huffman/machine.rb @@ -1,25 +1,7 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# Copyrigh, 2013, by Ilya Grigorik. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. # Machine generated Huffman decoder state machine. # DO NOT EDIT THIS FILE. diff --git a/lib/protocol/hpack/version.rb b/lib/protocol/hpack/version.rb index 8cbd783..34d8f82 100644 --- a/lib/protocol/hpack/version.rb +++ b/lib/protocol/hpack/version.rb @@ -1,24 +1,7 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. module Protocol module HPACK diff --git a/license.md b/license.md new file mode 100644 index 0000000..988d978 --- /dev/null +++ b/license.md @@ -0,0 +1,35 @@ +# MIT License + +Copyright, 2013-2016, by Ilya Grigorik. +Copyright, 2014-2015, by Kaoru Maeda. +Copyright, 2015, by Tamir Duberstein. +Copyright, 2016, by Kien Nguyen Trung. +Copyright, 2016, by George Ulmer. +Copyright, 2018, by Tiago Cardoso. +Copyright, 2018, by Byron Formwalt. +Copyright, 2018-2024, by Samuel Williams. +Copyright, 2018, by Kenichi Nakamura. +Copyright, 2019, by Jingyi Chen. +Copyright, 2019, by Cyril Roelandt. +Copyright, 2020, by Olle Jonsson. +Copyright, 2020, by Justin Mazzocchi. +Copyright, 2022, by Daniel Morrison. +Copyright, 2022, by Felix Yan. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/protocol-hpack.gemspec b/protocol-hpack.gemspec index e3c4a98..7e55dfd 100644 --- a/protocol-hpack.gemspec +++ b/protocol-hpack.gemspec @@ -1,24 +1,21 @@ +# frozen_string_literal: true require_relative "lib/protocol/hpack/version" Gem::Specification.new do |spec| - spec.name = "protocol-hpack" - spec.version = Protocol::HPACK::VERSION - spec.licenses = ["MIT"] - spec.authors = ["Samuel Williams"] - spec.email = ["samuel.williams@oriontransfer.co.nz"] - - spec.summary = "A compresssor and decompressor for HTTP 2.0 HPACK." - spec.homepage = "https://github.com/socketry/http-hpack" - - spec.files = `git ls-files -z`.split("\x0").reject do |f| - f.match(%r{^(test|spec|features)/}) - end + spec.name = "protocol-hpack" + spec.version = Protocol::HPACK::VERSION - spec.require_paths = ["lib"] - - spec.add_development_dependency "covered" - spec.add_development_dependency "bundler" - spec.add_development_dependency "rake", "~> 10.0" - spec.add_development_dependency "rspec", "~> 3.0" + spec.summary = "A compresssor and decompressor for HTTP 2.0 HPACK." + spec.authors = ["Samuel Williams", "Ilya Grigorik", "Tamir Duberstein", "Kaoru Maeda", "Tiago Cardoso", "Byron Formwalt", "Cyril Roelandt", "Daniel Morrison", "Felix Yan", "George Ulmer", "Jingyi Chen", "Justin Mazzocchi", "Kenichi Nakamura", "Kien Nguyen Trung", "Olle Jonsson"] + spec.license = "MIT" + + spec.cert_chain = ['release.cert'] + spec.signing_key = File.expand_path('~/.gem/release.pem') + + spec.homepage = "https://github.com/socketry/http-hpack" + + spec.files = Dir.glob(['{lib,tasks}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__) + + spec.required_ruby_version = ">= 3.0" end diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..310d6fe --- /dev/null +++ b/readme.md @@ -0,0 +1,68 @@ +# Protocol::HPACK + +Provides a compressor and decompressor for HTTP 2.0 headers, HPACK, as defined by [RFC7541](https://tools.ietf.org/html/rfc7541). + +[![Development Status](https://github.com/socketry/protocol-hpack/workflows/Test/badge.svg)](https://github.com/socketry/protocol-hpack/actions?workflow=Test) + +## Installation + +Add this line to your application's Gemfile: + +``` ruby +gem 'protocol-hpack' +``` + +And then execute: + + $ bundle + +Or install it yourself as: + + $ gem install protocol-hpack + +## Usage + +### Compressing Headers + +``` ruby +require 'protocol/hpack' + +buffer = String.new.b +compressor = Protocol::HPACK::Compressor.new(buffer) + +compressor.encode([['content-length', '5']]) +=> "\\\x015" +``` + +### Decompressing Headers + +Reusing `buffer` from above: + +``` ruby +require 'protocol/hpack' + +# Buffer from above... +buffer = "\\\x015" +decompressor = Protocol::HPACK::Decompressor.new(buffer) + +decompressor.decode +=> [["content-length", "5"]] +``` + +## Contributing + +We welcome contributions to this project. + +1. Fork it. +2. Create your feature branch (`git checkout -b my-new-feature`). +3. Commit your changes (`git commit -am 'Add some feature'`). +4. Push to the branch (`git push origin my-new-feature`). +5. Create new Pull Request. + +### Developer Certificate of Origin + +This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted. + +### Contributor Covenant + +This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms. diff --git a/release.cert b/release.cert new file mode 100644 index 0000000..d98e595 --- /dev/null +++ b/release.cert @@ -0,0 +1,28 @@ +-----BEGIN CERTIFICATE----- +MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11 +ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK +CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz +MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd +MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj +bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB +igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2 +9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW +sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE +e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN +XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss +RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn +tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM +zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW +xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O +BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs +aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs +aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE +cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl +xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/ +c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp +8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws +JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP +eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt +Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8 +voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg= +-----END CERTIFICATE----- diff --git a/spec/protocol/hpack/compressor/header_spec.rb b/spec/protocol/hpack/compressor/header_spec.rb index ca4f3b3..c48b997 100644 --- a/spec/protocol/hpack/compressor/header_spec.rb +++ b/spec/protocol/hpack/compressor/header_spec.rb @@ -1,25 +1,7 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# Copyrigheaders, 2013, by Ilya Grigorik. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publisheaders, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. require 'protocol/hpack/compressor' require 'protocol/hpack/decompressor' diff --git a/spec/protocol/hpack/compressor_spec.rb b/spec/protocol/hpack/compressor_spec.rb index bc0c548..1736acf 100644 --- a/spec/protocol/hpack/compressor_spec.rb +++ b/spec/protocol/hpack/compressor_spec.rb @@ -1,25 +1,14 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# Copyrigh, 2013, by Ilya Grigorik. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2013-2015, by Ilya Grigorik. +# Copyright, 2014, by Kaoru Maeda. +# Copyright, 2015, by Tamir Duberstein. +# Copyright, 2018, by Tiago Cardoso. +# Copyright, 2018, by Byron Formwalt. +# Copyright, 2018-2024, by Samuel Williams. +# Copyright, 2018, by Kenichi Nakamura. +# Copyright, 2019, by Jingyi Chen. require 'protocol/hpack/compressor' require 'protocol/hpack/decompressor' diff --git a/spec/protocol/hpack/context_spec.rb b/spec/protocol/hpack/context_spec.rb index ba97217..de1d5d4 100644 --- a/spec/protocol/hpack/context_spec.rb +++ b/spec/protocol/hpack/context_spec.rb @@ -1,25 +1,7 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# Copyrigh, 2013, by Ilya Grigorik. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. require 'protocol/hpack/context' diff --git a/spec/protocol/hpack/decompressor_spec.rb b/spec/protocol/hpack/decompressor_spec.rb index 3c4b5cc..21aa4e4 100644 --- a/spec/protocol/hpack/decompressor_spec.rb +++ b/spec/protocol/hpack/decompressor_spec.rb @@ -1,25 +1,7 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# Copyrigh, 2013, by Ilya Grigorik. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. require 'protocol/hpack/decompressor' require 'protocol/hpack/compressor' diff --git a/spec/protocol/hpack/external_spec.rb b/spec/protocol/hpack/external_spec.rb index 4770096..c1ce8a8 100644 --- a/spec/protocol/hpack/external_spec.rb +++ b/spec/protocol/hpack/external_spec.rb @@ -1,25 +1,11 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# Copyrigh, 2013, by Ilya Grigorik. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2014, by Kaoru Maeda. +# Copyright, 2014-2016, by Ilya Grigorik. +# Copyright, 2015, by Tamir Duberstein. +# Copyright, 2016, by Kien Nguyen Trung. +# Copyright, 2018-2024, by Samuel Williams. require 'protocol/hpack/compressor' require 'protocol/hpack/decompressor' diff --git a/spec/protocol/hpack/failures_spec.rb b/spec/protocol/hpack/failures_spec.rb new file mode 100644 index 0000000..76d055b --- /dev/null +++ b/spec/protocol/hpack/failures_spec.rb @@ -0,0 +1,113 @@ +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2024, by Samuel Williams. + +require 'protocol/hpack/context' +require 'protocol/hpack/compressor' +require 'protocol/hpack/decompressor' + +RSpec.describe Protocol::HPACK::Context do + let(:context) {Protocol::HPACK::Context.new} + + xit "should decode headers" do + context.table.replace([["forwarded", "for=::ffff:104.154.113.151;proto=https"], ["x-forwarded-for", "::ffff:104.154.113.151"], ["forwarded", "for=::ffff:107.22.138.64;proto=https"], ["x-forwarded-for", "::ffff:107.22.138.64"], ["if-modified-since", "Sat, 22 Jun 2019 10:40:42 GMT"], ["accept-encoding", "gzip,deflate"], ["user-agent", "Slackbot 1.0 (+https://api.slack.com/robots)"], [":method", "HEAD"], ["forwarded", "for=::ffff:35.184.226.236;proto=https"], ["x-forwarded-for", "::ffff:35.184.226.236"], ["forwarded", "for=::ffff:35.184.96.71;proto=https"], ["x-forwarded-for", "::ffff:35.184.96.71"], ["accept-encoding", "gzip, identity"], ["forwarded", "for=::ffff:54.194.39.149;proto=https"], ["x-forwarded-for", "::ffff:54.194.39.149"], ["user-agent", "Go-http-client/2.0"], ["accept-encoding", "gzip"], [":path", "/journal/atom"], ["forwarded", "for=::ffff:207.254.16.35;proto=https"], ["x-forwarded-for", "::ffff:207.254.16.35"], ["forwarded", "for=::ffff:35.224.112.202;proto=https"], ["x-forwarded-for", "::ffff:35.224.112.202"], ["forwarded", "for=::ffff:35.193.7.13;proto=https"], ["x-forwarded-for", "::ffff:35.193.7.13"], ["via", "h2 Falcon::Proxy"], ["forwarded", "for=::ffff:35.188.1.99;proto=https"], ["x-forwarded-proto", "https"], ["x-forwarded-for", "::ffff:35.188.1.99"], ["user-agent", "async-http"], ["accept", "*/*"], [":authority", "www.codeotaku.com"], [":path", "/index"]]) + + data = "\x87\x82\xDD\xDC\xDB\xDA\xD1\xD8\xD0\xD6" + + pp Protocol::HPACK::Decompressor.new(data, context).decode + end + + xit "should decode headers" do + context.table.replace([["via", " Falcon::Proxy"], ["forwarded", "for=::ffff:199.59.150.182;proto=https"], ["x-forwarded-for", "::ffff:199.59.150.182"], ["x-b3-traceid", "00a67e0e007a9eed"], ["x-b3-parentspanid", "b879b4d1180fe465"], ["x-b3-flags", "2"], ["x-b3-sampled", "false"], [":authority", "www.codeotaku.com"], [":path", "*/*"], [":method", "Accept:"], ["forwarded", "for=::ffff:216.244.66.248;proto=https"], ["x-forwarded-for", "::ffff:216.244.66.248"], ["accept-charset", "utf-8;q=0.7,iso-8859-1;q=0.2,*;q=0.1"], ["user-agent", "Mozilla/5.0 (compatible; DotBot/1.1; http://www.opensiteexplorer.org/dotbot, help@moz.com)"], [":path", "/robots.txt"], ["forwarded", "for=2600:3c03::f03c:91ff:fe74:ffce;proto=https"], ["x-forwarded-for", "2600:3c03::f03c:91ff:fe74:ffce"], ["user-agent", "Feed Wrangler/1.0 (1 subscriber; feed-id=479901; http://feedwrangler.net; Allow like Gecko)"], ["via", "HTTP/1.1 Falcon::Proxy"], ["forwarded", "for=::ffff:34.228.7.66;proto=https"], ["x-forwarded-for", "::ffff:34.228.7.66"], ["user-agent", "http.rb/2.2.2 (rubyland aggregator)"], [":path", "/journal/atom"], ["forwarded", "for=::ffff:2.234.120.219;proto=https"], ["x-forwarded-for", "::ffff:2.234.120.219"], ["te", "trailers"], ["cache-control", "no-cache"], ["pragma", "no-cache"], ["referer", "https://www.jqueryscript.net/demo/jQuery-Plugin-For-Checking-Content-Has-Been-Loaded-is-loading/doc-sample/"], ["dnt", "1"], ["accept-encoding", "gzip, deflate, br"], ["accept-language", "it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3"], ["user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"], [":path", "/_static/jquery-syntax/jquery.syntax.min.js"], ["origin", "https://www.codeotaku.com"], ["accept", "*/*"], ["content-type", "application/x-www-form-urlencoded; charset=UTF-8"], [":path", "/journal/2019-02/falcon-early-hints/comments/preview"], [":path", "/_components/jquery-syntax/base/jquery.syntax.brush.ruby.css?0.5324190477338245"], ["x-requested-with", "XMLHttpRequest"], ["accept", "text/html, */*; q=0.01"], [":path", "/journal/comments?node=/journal/2019-02/falcon-early-hints/index&_=1561202335609"], [":path", "/_components/jquery-syntax/paper/jquery.syntax.core.css?0.6647004838485858"], [":path", "/_components/jquery-syntax/bright/jquery.syntax.core.css?0.3520827623296918"], ["referer", "https://www.codeotaku.com/journal/2019-02/falcon-early-hints/index"], ["accept", "text/css,*/*;q=0.1"], ["cookie", "_ga=GA1.2.792841438.1560131922; _gid=GA1.2.1178560158.1561163892; _gat=1; __cfduid=d35427abef1ca87775a40da95d9a04cf61338222314; __cfduid=d35427abef1ca87775a40da95d9a04cf61338222314"], [":path", "/_components/jquery-syntax/base/jquery.syntax.core.css?0.7762324696928005"], ["via", "h2 Falcon::Proxy"], ["forwarded", "for=2406:e000:69b8:3601:608e:a93f:d3c1:22e0;proto=https"], ["x-forwarded-proto", "https"], ["x-forwarded-for", "2406:e000:69b8:3601:608e:a93f:d3c1:22e0"]]) + + data = "\x87B\x85\x84\x84-i\xB9D\x03*/*A\x8D\xF1\xE3\xC2\xE4<\x85:G\xD6\xD5\xC8z\x7F@\x89\xF2\xB4l\xAC\x81\xD3]\x05\x93\x84\x94t \xBF@\x88\xF2\xB4l\xAD-\x03\x99\x1F\x012@\x8D\xF2\xB4l\xADX\xEC-IEc\xA8\xD2\x7F\x8C\x8D\xE7_\x8D\xA9\x02\x17\x81)Zq\xBF\x90@\x89\xF2\xB4l\xAC\x9B\x06B\x9AO\x8B\x00\x06\xE3\xA5\x01@\aF\xF9K'\x7F\a\x90\xB9rYe\x96\xE0_}v\xDF\\-\x81p\xBC/\xEE\x7F\a\x9B\x94\xF6Ar\xE4\xB2\xCB-\xC0\xBE\xFA\xED\xBE\xB8[\x02\xE1x_u\xD8t\x9E\t\xD2\x9A\xD1|\x8BS\b\xE8!\xEA\xB9s]\x87\xF3\xEB" + + pp Protocol::HPACK::Decompressor.new(data, context).decode + end + + let(:initial_table) {[ + ["forwarded", "for=::ffff:216.244.66.248;proto=https"], + ["x-forwarded-for", "::ffff:216.244.66.248"], + ["accept-charset", "utf-8;q=0.7,iso-8859-1;q=0.2,*;q=0.1"], + ["user-agent", "Mozilla/5.0 (compatible; DotBot/1.1; http://www.opensiteexplorer.org/dotbot, help@moz.com)"], + [":path", "/robots.txt"], + ["forwarded", "for=2600:3c03::f03c:91ff:fe74:ffce;proto=https"], + ["x-forwarded-for", "2600:3c03::f03c:91ff:fe74:ffce"], + ["user-agent", "Feed Wrangler/1.0 (1 subscriber; feed-id=479901; http://feedwrangler.net; Allow like Gecko)"], + ["via", "HTTP/1.1 Falcon::Proxy"], + ["forwarded", "for=::ffff:34.228.7.66;proto=https"], + ["x-forwarded-for", "::ffff:34.228.7.66"], + ["user-agent", "http.rb/2.2.2 (rubyland aggregator)"], + [":path", "/journal/atom"], + ["forwarded", "for=::ffff:2.234.120.219;proto=https"], + ["x-forwarded-for", "::ffff:2.234.120.219"], + ["te", "trailers"], + ["cache-control", "no-cache"], + ["pragma", "no-cache"], + ["referer", "https://www.jqueryscript.net/demo/jQuery-Plugin-For-Checking-Content-Has-Been-Loaded-is-loading/doc-sample/"], + ["dnt", "1"], + ["accept-encoding", "gzip, deflate, br"], + ["accept-language", "it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3"], + ["user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"], + [":path", "/_static/jquery-syntax/jquery.syntax.min.js"], + ["origin", "https://www.codeotaku.com"], + ["accept", "*/*"], + ["content-type", "application/x-www-form-urlencoded; charset=UTF-8"], + [":path", "/journal/2019-02/falcon-early-hints/comments/preview"], + [":path", "/_components/jquery-syntax/base/jquery.syntax.brush.ruby.css?0.5324190477338245"], + ["x-requested-with", "XMLHttpRequest"], + ["accept", "text/html, */*; q=0.01"], + [":path", "/journal/comments?node=/journal/2019-02/falcon-early-hints/index&_=1561202335609"], + [":path", "/_components/jquery-syntax/paper/jquery.syntax.core.css?0.6647004838485858"], + [":path", "/_components/jquery-syntax/bright/jquery.syntax.core.css?0.3520827623296918"], + ["referer", "https://www.codeotaku.com/journal/2019-02/falcon-early-hints/index"], + ["accept", "text/css,*/*;q=0.1"], + ["cookie", "_ga=GA1.2.792841438.1560131922; _gid=GA1.2.1178560158.1561163892; _gat=1; __cfduid=d35427abef1ca87775a40da95d9a04cf61338222314; __cfduid=d35427abef1ca87775a40da95d9a04cf61338222314"], + [":path", "/_components/jquery-syntax/base/jquery.syntax.core.css?0.7762324696928005"], + ["via", "h2 Falcon::Proxy"], + ["forwarded", "for=2406:e000:69b8:3601:608e:a93f:d3c1:22e0;proto=https"], + ["x-forwarded-proto", "https"], + ["x-forwarded-for", "2406:e000:69b8:3601:608e:a93f:d3c1:22e0"], + ["referer", "https://www.codeotaku.com/journal/index"], + ["accept-language", "en-us"], + ["user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15"], + ["accept-encoding", "br, gzip, deflate"], + ["accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"] + ]} + + let(:headers) {[ + [":scheme", "https"], + [":method", "GET"], + [":path", "/"], + [":authority", "www.codeotaku.com"], + ["x-b3-sampled", "false"], + ["x-b3-flags", "2"], + ["x-b3-parentspanid", "b879b4d1180fe465"], + ["accept-encoding", "gzip, deflate"], + ["x-b3-traceid", "00a67e0e007a9eed"], + ["x-forwarded-for", "::ffff:199.59.150.182"], + ["x-forwarded-proto", "https"], + ["forwarded", "for=::ffff:199.59.150.182;proto=https"], + ["via", " Falcon::Proxy"] + ]} + + it "should encode headers" do + context.table.replace(initial_table.dup) + + # Encoding these headers produces wrong results? + pp Protocol::HPACK::Compressor.new(String.new.b, context).encode(headers) + + pp context.table + end + + it "should decode headers" do + context.table.replace(initial_table.dup) + + data = "\x87B\x85\x84\x84-i\xB9D\x03*/*A\x8D\xF1\xE3\xC2\xE4<\x85:G\xD6\xD5\xC8z\x7F@\x89\xF2\xB4l\xAC\x81\xD3]\x05\x93\x84\x94t \xBF@\x88\xF2\xB4l\xAD-\x03\x99\x1F\x012@\x8D\xF2\xB4l\xADX\xEC-IEc\xA8\xD2\x7F\x8C\x8D\xE7_\x8D\xA9\x02\x17\x81)Zq\xBF\x90@\x89\xF2\xB4l\xAC\x9B\x06B\x9AO\x8B\x00\x06\xE3\xA5\x01@\aF\xF9K'\x7F\a\x90\xB9rYe\x96\xE0_}v\xDF\\-\x81p\xBC/\xEE\x7F\a\x9B\x94\xF6Ar\xE4\xB2\xCB-\xC0\xBE\xFA\xED\xBE\xB8[\x02\xE1x_u\xD8t\x9E\t\xD2\x9A\xD1|\x8BS\b\xE8!\xEA\xB9s]\x87\xF3\xEB" + + pp Protocol::HPACK::Decompressor.new(data, context).decode + + # pp context.table + end +end diff --git a/spec/protocol/hpack/huffman_spec.rb b/spec/protocol/hpack/huffman_spec.rb index 704bd92..8722d8a 100644 --- a/spec/protocol/hpack/huffman_spec.rb +++ b/spec/protocol/hpack/huffman_spec.rb @@ -1,24 +1,10 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2014, by Kaoru Maeda. +# Copyright, 2015, by Tamir Duberstein. +# Copyright, 2015, by Ilya Grigorik. +# Copyright, 2018-2024, by Samuel Williams. require 'protocol/hpack/huffman' diff --git a/spec/protocol/hpack/rfc7541/dump.rb b/spec/protocol/hpack/rfc7541/dump.rb index e877720..63a3434 100644 --- a/spec/protocol/hpack/rfc7541/dump.rb +++ b/spec/protocol/hpack/rfc7541/dump.rb @@ -1,6 +1,9 @@ #!/usr/bin/env ruby # frozen_string_literal: true +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. + require 'yaml' spec_examples = [ diff --git a/spec/protocol/hpack/rfc7541_spec.rb b/spec/protocol/hpack/rfc7541_spec.rb index f600e45..31c56fd 100644 --- a/spec/protocol/hpack/rfc7541_spec.rb +++ b/spec/protocol/hpack/rfc7541_spec.rb @@ -1,5 +1,8 @@ # frozen_string_literal: true +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. + require 'protocol/hpack/compressor' require 'protocol/hpack/decompressor' @@ -99,4 +102,4 @@ def self.fixtures(mode) end end end -end \ No newline at end of file +end diff --git a/spec/protocol/hpack_spec.rb b/spec/protocol/hpack_spec.rb index 113aaa9..49791ea 100644 --- a/spec/protocol/hpack_spec.rb +++ b/spec/protocol/hpack_spec.rb @@ -1,24 +1,7 @@ # frozen_string_literal: true -# Copyright, 2018, by Samuel G. D. Williams. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. require 'protocol/hpack' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 17869de..bd64589 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,8 @@ # frozen_string_literal: true +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. + require 'covered/rspec' RSpec.configure do |config| diff --git a/tasks/huffman.rb b/tasks/huffman.rb index 81d098d..e82da1f 100644 --- a/tasks/huffman.rb +++ b/tasks/huffman.rb @@ -1,5 +1,12 @@ # frozen_string_literal: true +# Released under the MIT License. +# Copyright, 2014, by Kaoru Maeda. +# Copyright, 2015, by Tamir Duberstein. +# Copyright, 2015, by Ilya Grigorik. +# Copyright, 2016, by George Ulmer. +# Copyright, 2018-2024, by Samuel Williams. + require_relative '../lib/http/hpack/huffman' require 'set' @@ -102,26 +109,10 @@ def self.generate_state_table File.open(File.expand_path('../lib/http/hpack/huffman/machine.rb', File.dirname(__FILE__)), 'w') do |f| f.print <
-# Copyrigh, 2013, by Ilya Grigorik. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2018-2024, by Samuel Williams. # Machine generated Huffman decoder state machine. # DO NOT EDIT THIS FILE.