From 0b54c892667f86ce9b8e5ee33f8a7901aaff9c89 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 4 Jul 2019 21:33:10 +0000 Subject: http: memoize more common fields "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 -- cgit v1.2.3-24-ge0c7