By default, as RFC 7540 calls for, pushed stream depends on its
associated (parent) stream. There are some situations that this is
sub-optimal. For example, if associated stream is HTML, and server is
configured to push css and javascript files which are in critical
rendering path. Then the default priority scheme is sub-optimal,
since browser typically blocks rendering while waiting for critical
resources. In this case, it is better to at least give pushed stream
the same priority of associated stream, and interleave these streams.
This change gives pushed stream the same priority of associated stream
if pushed stream has content-type "application/javascript" or
"text/css". The pushed stream now depends on the stream which
associated stream depends on. We use the same weight of associated
stream.
RFC 7540 says that proxy should not emit :authority when translating
HTTP/1 request in origin or asterisk form to HTTP/2. To keep this
semantics in tact, we should also refrain from emitting :authority if
it is missing (host header field is required in this case).
Header field related functions are now gathered into FieldStore class.
This commit only handles request. Subsequent commit will do the same
thing for response.
This commit makes sure that WebSocket upgrade works for HTTP/1.1
frontend and backend pair. Actually, this implementation probably
supports other upgrade as well, other than HTTP/2 Upgrade, which is
handled specially in other place.
From autoconf manual, section 5.6.1 Portability of Headers, says:
"""
The C99 standard says that inttypes.h includes stdint.h, so there's no
need to include stdint.h separately in a standard environment. Some
implementations have inttypes.h but not stdint.h (e.g., Solaris 7),
but we don't know of any implementation that has stdint.h but not
inttypes.h.
"""
It turns out that the cause of complication in backend request line
construction is a absolute-form in HTTP/1 request. In HTTP/2, we have
separated pseudo-header fields and no problem at all. In this commit,
we parse request URI in HTTP/1 frontend and extract values from it to
make backend logic simpler. This patch removes host header field
emission in HTTP/2 backend if :authority is emitted. It also rewrites
host header field with authority part in absolute-form URI as per RFC
7230.