unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
From: Eric Wong <e@80x24.org>
To: unicorn-public@bogomips.org
Subject: [PATCH 3/3] http: memoize more common fields
Date: Thu,  4 Jul 2019 22:01:08 +0000
Message-ID: <20190704220108.7849-4-e@80x24.org> (raw)
In-Reply-To: <20190704220108.7849-1-e@80x24.org>

"DNT" is common, nowadays.
"Forwarded" is... *shrug* It's an RFC, at least.
"Origin" is a CORS, and something I've seen.

I've seen "Upgrade-Insecure-Requests", "X-Forwarded-Host",
"X-Request-ID", and "X-Requested-With" in the wild, too;
so add those.
---
 ext/unicorn_http/common_fields.gperf | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/ext/unicorn_http/common_fields.gperf b/ext/unicorn_http/common_fields.gperf
index 179afe5..a10f4cd 100644
--- a/ext/unicorn_http/common_fields.gperf
+++ b/ext/unicorn_http/common_fields.gperf
@@ -28,7 +28,11 @@ CONTENT_LENGTH
 CONTENT_TYPE
 COOKIE
 DATE
+# Do Not Track
+DNT
 EXPECT
+# RFC 7239 (does anybody use Forwarded:?)
+FORWARDED
 FROM
 HOST
 IF_MATCH
@@ -39,6 +43,7 @@ IF_UNMODIFIED_SINCE
 # Firefox sends Keep-Alive (or maybe only old versions?)
 KEEP_ALIVE
 MAX_FORWARDS
+ORIGIN
 PRAGMA
 PROXY_AUTHORIZATION
 RANGE
@@ -47,10 +52,15 @@ TE
 TRAILER
 TRANSFER_ENCODING
 UPGRADE
+UPGRADE_INSECURE_REQUESTS
 USER_AGENT
 VIA
 # common proxies set some of these X- headers
 X_FORWARDED_FOR
+X_FORWARDED_HOST
 X_FORWARDED_PROTO
 X_REAL_IP
+X_REQUEST_ID
+# XMLHttpRequest
+X_REQUESTED_WITH
 WARNING
-- 
EW


  parent reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 22:01 [PATCH 0/3] http: use gperf for common field memoization Eric Wong
2019-07-04 22:01 ` [PATCH 1/3] unit benchmark for our HTTP parser Eric Wong
2019-07-04 22:01 ` [PATCH 2/3] http: use gperf for common fields optimization Eric Wong
2019-07-04 22:01 ` Eric Wong [this message]
2019-07-05 20:30 ` [PATCH 4/3] http: gperf 3.0.3 compatibility Eric Wong

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://bogomips.org/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190704220108.7849-4-e@80x24.org \
    --to=e@80x24.org \
    --cc=unicorn-public@bogomips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror http://bogomips.org/unicorn-public
	git clone --mirror http://ou63pmih66umazou.onion/unicorn-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.unicorn

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox