summaryrefslogtreecommitdiffstats
path: root/genheaderfunc.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 07:34:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 07:34:15 +0000
commitafea5f9539cbf1eeaa85ec77d79eb2f59724f470 (patch)
tree2a4eba394a6bc60d2eaa8304d91168a07225d51e /genheaderfunc.py
parentInitial commit. (diff)
downloadnghttp2-afea5f9539cbf1eeaa85ec77d79eb2f59724f470.tar.xz
nghttp2-afea5f9539cbf1eeaa85ec77d79eb2f59724f470.zip
Adding upstream version 1.52.0.upstream/1.52.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xgenheaderfunc.py47
1 files changed, 47 insertions, 0 deletions
diff --git a/genheaderfunc.py b/genheaderfunc.py
new file mode 100755
index 0000000..7192760
--- /dev/null
+++ b/genheaderfunc.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python3
+
+from gentokenlookup import gentokenlookup
+
+HEADERS = [
+ ':authority',
+ ':method',
+ ':path',
+ ':scheme',
+ ':status',
+ ':host', # for spdy
+ ':protocol',
+ 'expect',
+ 'host',
+ 'if-modified-since',
+ "te",
+ "cookie",
+ "http2-settings",
+ "server",
+ "via",
+ "forwarded",
+ "x-forwarded-for",
+ "x-forwarded-proto",
+ "alt-svc",
+ "content-length",
+ "location",
+ "trailer",
+ "link",
+ "accept-encoding",
+ "accept-language",
+ "cache-control",
+ "user-agent",
+ "date",
+ "content-type",
+ "early-data",
+ "sec-websocket-accept",
+ "sec-websocket-key",
+ # disallowed h1 headers
+ 'connection',
+ 'keep-alive',
+ 'proxy-connection',
+ 'transfer-encoding',
+ 'upgrade'
+]
+
+if __name__ == '__main__':
+ gentokenlookup(HEADERS, 'HD_')