* [PATCH 3/3] http: memoize more common fields
2019-07-04 22:01 5% [PATCH 0/3] http: use gperf for common field memoization Eric Wong
@ 2019-07-04 22:01 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-07-04 22:01 UTC (permalink / raw)
To: unicorn-public
"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
^ permalink raw reply related [relevance 7%]
* [PATCH 0/3] http: use gperf for common field memoization
@ 2019-07-04 22:01 5% Eric Wong
2019-07-04 22:01 7% ` [PATCH 3/3] http: memoize more common fields Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-07-04 22:01 UTC (permalink / raw)
To: unicorn-public
I've been using gperf in other places, so I figured I might
as well make HTTP parsing a teeny bit faster and allow us
to avoid generating more garbage up front.
Eric Wong (3):
unit benchmark for our HTTP parser
http: use gperf for common fields optimization
http: memoize more common fields
.gitignore | 1 +
GNUmakefile | 18 ++++-
ext/unicorn_http/common_field_optimization.h | 79 +++++---------------
ext/unicorn_http/common_fields.gperf | 66 ++++++++++++++++
ext/unicorn_http/gperf.rb | 27 +++++++
test/benchmark/http_parser.rb | 43 +++++++++++
6 files changed, 170 insertions(+), 64 deletions(-)
create mode 100644 ext/unicorn_http/common_fields.gperf
create mode 100644 ext/unicorn_http/gperf.rb
create mode 100644 test/benchmark/http_parser.rb
--
EW
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-07-04 22:01 5% [PATCH 0/3] http: use gperf for common field memoization Eric Wong
2019-07-04 22:01 7% ` [PATCH 3/3] http: memoize more common fields Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).