Fix bugs and make improvements

- Fix regression with `%lu`
- Added some more headers witnessed in the wild
- Added `-M INT` option to redbean to tune max payload size
- Work around InfoZIP 256 character limit on comment line size
This commit is contained in:
Justine Tunney 2021-05-01 05:11:35 -07:00
parent 3aa8983ec1
commit 1966369e8e
17 changed files with 574 additions and 415 deletions

View file

@ -11,68 +11,77 @@
%define lookup-function-name LookupHttpHeader
struct thatispacked HttpHeaderSlot { char *name; char code; };
%%
Accept, kHttpAccept
Accept-Charset, kHttpAcceptCharset
Accept-Encoding, kHttpAcceptEncoding
Accept-Language, kHttpAcceptLanguage
Age, kHttpAge
Allow, kHttpAllow
Authorization, kHttpAuthorization
Host, kHttpHost
Cache-Control, kHttpCacheControl
Chunked, kHttpChunked
Link, kHttpLink
Connection, kHttpConnection
Content-Base, kHttpContentBase
Content-Encoding, kHttpContentEncoding
Content-Language, kHttpContentLanguage
Accept, kHttpAccept
Accept-Language, kHttpAcceptLanguage
Accept-Encoding, kHttpAcceptEncoding
User-Agent, kHttpUserAgent
Referer, kHttpReferer
X-Forwarded-For, kHttpXForwardedFor
Origin, kHttpOrigin
Upgrade-Insecure-Requests, kHttpUpgradeInsecureRequests
Pragma, kHttpPragma
Cookie, kHttpCookie
DNT, kHttpDnt
Sec-GPC, kHttpSecGpc
From, kHttpFrom
If-Modified-Since, kHttpIfModifiedSince
X-Requested-With, kHttpXRequestedWith
X-Forwarded-Host, kHttpXForwardedHost
X-Forwarded-Proto, kHttpXForwardedProto
X-CSRF-Token, kHttpXCsrfToken
Save-Data, kHttpSaveData
Range, kHttpRange
Content-Length, kHttpContentLength
Content-Type, kHttpContentType
Vary, kHttpVary
Date, kHttpDate
Server, kHttpServer
Expires, kHttpExpires
Content-Encoding, kHttpContentEncoding
Last-Modified, kHttpLastModified
ETag, kHttpEtag
Allow, kHttpAllow
Content-Range, kHttpContentRange
Accept-Charset, kHttpAcceptCharset
Access-Control-Allow-Credentials, kHttpAccessControlAllowCredentials
Access-Control-Allow-Headers, kHttpAccessControlAllowHeaders
Access-Control-Allow-Methods, kHttpAccessControlAllowMethods
Access-Control-Allow-Origin, kHttpAccessControlAllowOrigin
Access-Control-MaxAge, kHttpAccessControlMaxAge
Access-Control-Method, kHttpAccessControlMethod
Access-Control-RequestHeaders, kHttpAccessControlRequestHeaders
Access-Control-Request-Method, kHttpAccessControlRequestMethod
Access-Control-Request-Methods, kHttpAccessControlRequestMethods
Age, kHttpAge
Authorization, kHttpAuthorization
Content-Base, kHttpContentBase
Content-Description, kHttpContentDescription
Content-Disposition, kHttpContentDisposition
Content-Language, kHttpContentLanguage
Content-Location, kHttpContentLocation
Content-MD5, kHttpContentMd5
Content-Range, kHttpContentRange
Content-Type, kHttpContentType
Date, kHttpDate
ETag, kHttpEtag
Expires, kHttpExpires
From, kHttpFrom
Host, kHttpHost
Expect, kHttpExpect
If-Match, kHttpIfMatch
If-Modified-Since, kHttpIfModifiedSince
If-None-Match, kHttpIfNoneMatch
If-Range, kHttpIfRange
If-Unmodified-Since, kHttpIfUnmodifiedSince
Keep-Alive, kHttpKeepAlive
Link, kHttpLink
Location, kHttpLocation
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
TE, kHttpTe
Trailer, kHttpTrailer
Transfer-Encoding, kHttpTransferEncoding
Upgrade, kHttpUpgrade
Uri, kHttpUri
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
X-Csrf-Token, kHttpXCsrfToken
X-Forwarded-For, kHttpXForwardedFor
X-Forwarded-Host, kHttpXForwardedHost
X-Forwarded-Proto, kHttpXForwardedProto
X-Requested-With, kHttpXRequestedWith
Access-Control-Request-Method, kHttpAccessControlRequestMethod
Access-Control-Request-Headers, kHttpAccessControlRequestHeaders
Via, kHttpVia