Tatsuhiro Tsujikawa
c64d2573dc
Replace http-parser with llhttp
...
llhttp does not include URL parser. We extracted URL parser code from
http-parser and put it under third-party/url-parser.
llhttp bd3d224eb8cdc92c6fc8f508d7bbe0ba266e8e92
2019-04-20 18:42:30 +09:00
Tatsuhiro Tsujikawa
ab2aa5672b
Fix test failure
...
Now http_parser_parse_url returns nonzero if empty URI is given.
2019-01-17 23:16:49 +09:00
Tatsuhiro Tsujikawa
d63b4c1034
nghttpx: Forward multiple via, xff, and xfp header fields
...
Previously, for Via, X-Forwarded-For, and X-Forwarded-Proto header
field, nghttpx only forwarded the last header field of each. With
this commit, nghttpx forwards all of them if it is configured to do
so.
2017-04-26 21:23:13 +09:00
Tatsuhiro Tsujikawa
4bf3cb2cc0
Revert "nghttpx: Don't capitalize h1 header fields"
...
This reverts commit f994664934
.
2017-02-12 23:27:38 +09:00
Tatsuhiro Tsujikawa
f994664934
nghttpx: Don't capitalize h1 header fields
2017-02-11 18:41:52 +09:00
Tatsuhiro Tsujikawa
8471c9e92e
nghttpx: Parse te header field a bit more properly
2016-11-07 22:47:48 +09:00
Tatsuhiro Tsujikawa
0cf6848646
clang-format-3.9
2016-10-15 18:36:04 +09:00
Tatsuhiro Tsujikawa
ad8be7d474
src: parse_link_header takes StringRef
2016-03-25 23:51:42 +09:00
Tatsuhiro Tsujikawa
00b2d7d513
src: Remove lookup_token(const std::string&)
2016-03-25 23:29:16 +09:00
Tatsuhiro Tsujikawa
01408209d8
nghttpx: Fix the bug that forwarded query contains duplicated '?'
...
This change also fixes that bug that the multiple '/' at the start of
request were not coalesced into one.
2016-03-14 22:20:00 +09:00
Tatsuhiro Tsujikawa
7a412df9a5
nghttpx: Fix tests
2016-03-12 21:12:26 +09:00
Tatsuhiro Tsujikawa
3f2b54cfc4
src: Refactor using StringRef
2016-03-04 00:33:35 +09:00
Tatsuhiro Tsujikawa
acbf38fd3c
src: Refactor using StringRef, simplify function parameters
2016-03-04 00:26:59 +09:00
Tatsuhiro Tsujikawa
aaf0177318
src: Use str_size
2016-03-03 23:23:51 +09:00
Tatsuhiro Tsujikawa
9afc017532
src: Don't push if Link header field includes nopush
2016-03-03 23:20:32 +09:00
Tatsuhiro Tsujikawa
9672bc322f
src: Remove unused functions
2016-02-21 16:51:46 +09:00
Tatsuhiro Tsujikawa
ac41946533
nghttpx: Use NGHTTP2_NV_FLAG_NO_COPY_NAME and NGHTTP2_NV_FLAG_NO_COPY_VALUE
...
For both HTTP/2 frontend and backend.
Also adds http2::stringify_status to optimize status code
serialization.
2015-11-05 23:47:11 +09:00
Tatsuhiro Tsujikawa
02adaac368
nghttpx: Write h1 header into downstream buffer directly
2015-09-11 23:49:47 +09:00
Tatsuhiro Tsujikawa
ef1595672c
nghttpx: Add Request#push in mruby scripting
...
Refactor Http2Upstream so that we can share code between link header
field based push and mruby push.
2015-09-06 00:05:07 +09:00
Tatsuhiro Tsujikawa
5dc060c1a2
src: Use C++11 value-initialization, instead of memset-ing 0
2015-07-19 17:55:37 +09:00
Tatsuhiro Tsujikawa
19e47a1922
nghttpx: Normalize path when setting it to Downstream
2015-07-11 16:12:35 +09:00
Tatsuhiro Tsujikawa
3119fc259c
Select backend based on request host and path by extending -b option
...
-b option syntax is now <HOST>,<PORT>[;<PATTERN>[:...]]. The optional
<PATTERN>s specify the request host and path it is used for. The
<PATTERN> can contain path, host + path or host. The matching rule is
closely designed to ServeMux in Go programming language.
2015-07-11 00:15:52 +09:00
Tatsuhiro Tsujikawa
90eac0709d
src: Make sure that empty param is error when parsing Link header field
2015-05-24 15:40:16 +09:00
Tatsuhiro Tsujikawa
7451a73def
nghttpx: Don't push resource if link header has non empty loadpolicy
2015-04-12 17:42:25 +09:00
Tatsuhiro Tsujikawa
4042ff0fc4
nghttpx: Fix te header field is duplicated when forwarding HTTP/2 backend
2015-03-25 01:17:06 +09:00
Tatsuhiro Tsujikawa
07fdaaba45
src: Use case-insensitive match when parsing Link header field
2015-02-10 23:29:45 +09:00
Tatsuhiro Tsujikawa
ad8e9a4741
src: Ignore URI with non-empty anchor parameter
2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa
2e425e3cb6
src: Support backslash escapes in quoted-string when parsing Link header
2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa
1b00bc1929
src: Support rel with quoted value in Link header parser
2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa
d151759f8a
nghttpx: Fix location rewrite, take 2
2015-02-08 21:26:47 +09:00
Tatsuhiro Tsujikawa
4d47c31ebe
src: Refactor parse_next_link_header_once
2015-02-08 17:47:21 +09:00
Tatsuhiro Tsujikawa
9e723b6b1d
src: Rename LinkHeader.url as LinkHeader.uri
2015-02-08 17:29:38 +09:00
Tatsuhiro Tsujikawa
8c90e5314d
src: Update doc
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
b14cfaf308
src: Store token in Header object to avoid additional lookups
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
c55d7343ca
nghttpx: Support server push using Link header field
...
nghttpx server push is initiated by looking for Link header field from
backend server response. Currently we only enable server push for
HTTP/1 backend and without HTTP/2 proxy mode. The URIs which have
rel=preload are eligible to resource to be pushed.
2015-02-08 16:10:00 +09:00
Tatsuhiro Tsujikawa
f8f9b36acd
http2: Use std::array for indexing headers
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
2a56a3d9ea
nghttpx: Fix te request header handling
...
Checking against "trailers" is enough for now.
2015-01-25 22:58:43 +09:00
Tatsuhiro Tsujikawa
434e80dc7b
nghttpx: Reset stream if TE header field contains other than trailer
2015-01-24 15:31:59 +09:00
Tatsuhiro Tsujikawa
3ae44ef2f3
nghttpd, nghttpx: Rework incoming header handling
2015-01-05 01:46:41 +09:00
Tatsuhiro Tsujikawa
730d47f7ad
src: Add unittest for http2::index_header
2015-01-03 22:03:00 +09:00
Tatsuhiro Tsujikawa
9a35dbc4ab
src: Just check emptiness for value since spaces around value are stripped
2014-12-15 23:14:07 +09:00
Tatsuhiro Tsujikawa
6f70a53da6
src: http2::add_header: strip white spaces in value
2014-12-15 23:04:45 +09:00
Tatsuhiro Tsujikawa
b1f807abd1
Reformat lines with clang-format-3.5
2014-11-27 23:56:30 +09:00
Tatsuhiro Tsujikawa
e217e789de
nghttp: Support non-final response and check pseudo headers
2014-08-08 23:03:12 +09:00
Tatsuhiro Tsujikawa
d4d56e1846
nghttpd, nghttpx: Check that pseudo headers come before normal headers
2014-08-08 20:52:32 +09:00
Tatsuhiro Tsujikawa
d496c42dc9
Revert "nghttpx, nghttpd: Check pseudo header fields come before normal header fields"
...
This reverts commit cc24b9aaf0
.
2014-08-08 20:17:03 +09:00
Tatsuhiro Tsujikawa
cc24b9aaf0
nghttpx, nghttpd: Check pseudo header fields come before normal header fields
2014-08-07 22:49:34 +09:00
Tatsuhiro Tsujikawa
9fb2bc8468
src: Remove http2::sort_nva
...
This function is no longer necessary because 0x00 concatenation rule
is gone.
2014-08-07 21:55:30 +09:00
Tatsuhiro Tsujikawa
6e027ad830
nghttpd, nghttpx: Check allowed pseudo headers
2014-07-31 23:05:53 +09:00
Tatsuhiro Tsujikawa
9f17bee51d
Fix unittest failure
2014-07-31 23:05:53 +09:00