Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't compress cookie/set-cookie headers #1389

Merged
merged 3 commits into from
Sep 12, 2017
Merged

Don't compress cookie/set-cookie headers #1389

merged 3 commits into from
Sep 12, 2017

Conversation

jbenoist
Copy link
Contributor

@jbenoist jbenoist commented Jul 29, 2017

Certain headers are suspected of being risky to compress as they might just make table probing much too easy, see:

https://http2.github.io/http2-spec/compression.html#Security

This change marks 'cookie/set-cookie' as such and ensures h2o wont compress or index them.

@deweerdt
Copy link
Member

@jbenoist could you please add test coverage, now that h2get has displays a list of compressed headers?

@kazuho
Copy link
Member

kazuho commented Sep 5, 2017

Sorry for the belated response.

I think that this is a good change. However we might be afraid of keeping too many things not being compressed.

Could we follow what Firefox does, i.e. keep cookies longer than 20 bytes as they are?
https://dxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/Http2Compression.cpp#1202

- Limit the feature to fields of length < 20-bytes
@kazuho kazuho merged commit eea043d into h2o:master Sep 12, 2017
@kazuho
Copy link
Member

kazuho commented Sep 12, 2017

Thank you for the changes! (And did you rebase the pull request fixing the conflicts? Thank you for the effort).

The PR has been merged to master.

kazuho added a commit that referenced this pull request Apr 25, 2018
Don't compress cookie/set-cookie headers
joemfb added a commit to joemfb/h2o that referenced this pull request Jul 18, 2018
* tag 'v2.2.5': (37 commits)
  releng for 2.2.5
  update Changes
  extract https://github.com/h2o/neverbleed @ 1e9b518 () at deps/neverbleed
  Update line_end when reallocating a buffer for logging
  Merge pull request h2o#1718 from h2o/kazuho/tls13-26
  Merge pull request h2o#1485 from h2o/kazuho/update-picotls-2
  Merge pull request h2o#1707 from fetus-hina/libressl_2.7
  Merge pull request h2o#1545 from h2o/i110/fix-sock-bytes-written
  Merge pull request h2o#1716 with tweaks
  Merge pull request h2o#1662 from h2o/i110/mruby-fix-preload-require-path
  Merge pull request h2o#1310 from deweerdt/deweerdt/x-http2-push-only-support-for-mruby
  Merge pull request h2o#1587 from h2o/kazuho/amend-1582
  Merge pull request h2o#1582 from h2o/kazuho/h2-negative-window
  Merge pull request h2o#1579 from h2o/kazuho/http2/ignore-reserved-bit-of-frame-header
  Merge pull request h2o#1555 from h2o/i110/stop-opening-new-push-streams-after-goaway
  Merge pull request h2o#1389 from jbenoist/master
  Merge pull request h2o#1650 from h2o/i110/append-index-file-name-to-script-name
  releng for 2.2.4
  update Changes
  regen doc
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants