cosmopolitan/net/http/gethttpheader.gperf
Justine Tunney 4effa23528 Make more major improvements to redbean
- POSIX regular expressions for Lua
- Improved protocol parsing and encoding
- Additional APIs for ZIP storage retrieval
- Fix st_mode issue on NT for regular files
- Generalized APIs for URL and Host handling
- Worked out the kinks in resource resolution
- Allow for custom error pages like /404.html
2021-04-20 19:14:21 -07:00

71 lines
2.7 KiB
Text

%{
#include "libc/str/str.h"
#include "net/http/http.h"
#define GPERF_DOWNCASE
%}
%compare-strncmp
%ignore-case
%language=ANSI-C
%readonly-tables
%struct-type
%define lookup-function-name LookupHttpHeader
struct HttpHeaderSlot { char *name; char code; };
%%
Accept, kHttpAccept
Accept-Charset, kHttpAcceptCharset
Accept-Encoding, kHttpAcceptEncoding
Accept-Language, kHttpAcceptLanguage
Age, kHttpAge
Allow, kHttpAllow
Authorization, kHttpAuthorization
Cache-Control, kHttpCacheControl
Chunked, kHttpChunked
Link, kHttpLink
Connection, kHttpConnection
Content-Base, kHttpContentBase
Content-Encoding, kHttpContentEncoding
Content-Language, kHttpContentLanguage
Content-Length, kHttpContentLength
Content-Location, kHttpContentLocation
Content-MD5, kHttpContentMd5
Content-Range, kHttpContentRange
Content-Type, kHttpContentType
Date, kHttpDate
ETag, kHttpEtag
Expires, kHttpExpires
From, kHttpFrom
Host, kHttpHost
If-Match, kHttpIfMatch
If-Modified-Since, kHttpIfModifiedSince
If-None-Match, kHttpIfNoneMatch
If-Range, kHttpIfRange
If-Unmodified-Since, kHttpIfUnmodifiedSince
Keep-Alive, kHttpKeepAlive
Max-Forwards, kHttpMaxForwards
Pragma, kHttpPragma
Proxy-Authenticate, kHttpProxyAuthenticate
Proxy-Authorization, kHttpProxyAuthorization
Proxy-Connection, kHttpProxyConnection
Range, kHttpRange
Referer, kHttpReferer
Transfer-Encoding, kHttpTransferEncoding
Upgrade, kHttpUpgrade
User-Agent, kHttpUserAgent
Via, kHttpVia
Location, kHttpLocation
Public, kHttpPublic
Retry-After, kHttpRetryAfter
Server, kHttpServer
Vary, kHttpVary
Warning, kHttpWarning
WWW-Authenticate, kHttpWwwAuthenticate
Last-Modified, kHttpLastModified
Trailer, kHttpTrailer
TE, kHttpTe
DNT, kHttpDnt
Expect, kHttpExpect
Content-Disposition, kHttpContentDisposition
Content-Description, kHttpContentDescription
Origin, kHttpOrigin
Upgrade-Insecure-Requests, kHttpUpgradeInsecureRequests
URI, kHttpUri