Commit Graph

1855 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa f5b4fd23da src: Fix compiler error on travis 2016-01-17 22:47:50 +09:00
Tatsuhiro Tsujikawa ee43250015 nghttpx: Remove useless comment 2016-01-17 22:26:13 +09:00
Tatsuhiro Tsujikawa 9f0f5c60ad ImmutableString: Remove std::unique_ptr<char[]> ctor overload 2016-01-17 22:25:10 +09:00
Tatsuhiro Tsujikawa 09de332028 ImmutableString: Less fields 2016-01-17 22:25:10 +09:00
Tatsuhiro Tsujikawa 3d5f5b6a28 nghttpx: Fix compiler warning 2016-01-17 18:27:25 +09:00
Tatsuhiro Tsujikawa eb7b3295d1 ImmutableString, StringRef: Add empty() and operator[]
We won't add operator[] to StringRef.  This is because it may be
undefined if pos == size(), and StringRef's base + len does not point
to the valid region.  This solely depends on the given buffer, so we
cannot do anything to fix.  For workaround, if we need this kind of
operator, we may add it under another name, like char_at(size_type).
2016-01-17 18:09:12 +09:00
Tatsuhiro Tsujikawa 5131b95c2f ImmutableString: Ensure that c_str() returns non-nullptr if it is default constructed 2016-01-17 18:00:36 +09:00
Tatsuhiro Tsujikawa ba543e3895 memchunk: Add noexcept 2016-01-17 17:16:20 +09:00
Tatsuhiro Tsujikawa ef5d981ab1 nghttpx: Simplify 2016-01-17 17:04:16 +09:00
Tatsuhiro Tsujikawa d5efab4993 src: Add inequality operator for StringRef 2016-01-17 16:42:19 +09:00
Tatsuhiro Tsujikawa 919e9eee63 nghttpx: It is enough to check "chunked" in the suffix 2016-01-17 16:34:56 +09:00
Tatsuhiro Tsujikawa e255468bdf nghttpx: Fix tests 2016-01-17 16:33:23 +09:00
Tatsuhiro Tsujikawa 39c0a71065 src: Add tests for ImmutableString and StringRef 2016-01-17 16:32:55 +09:00
Tatsuhiro Tsujikawa 7b2d4b6ae6 nghttpx: Optimize logging further 2016-01-17 15:04:09 +09:00
Tatsuhiro Tsujikawa 4f07db8bcb src: Rename our new string classes 2016-01-17 11:33:45 +09:00
Tatsuhiro Tsujikawa 959d378f2a nghttpx: Optimize accesslog write 2016-01-17 11:19:19 +09:00
Tatsuhiro Tsujikawa 506de55475 src: Less strlen 2016-01-17 01:29:52 +09:00
Tatsuhiro Tsujikawa 045578989c src: Update doc 2016-01-17 01:21:58 +09:00
Tatsuhiro Tsujikawa d16ff1f519 nghttpx: Use StringAdaptor for Config::server_name 2016-01-17 01:15:11 +09:00
Tatsuhiro Tsujikawa 2c7ed01f0c nghttpx: Use std::string for Downstream::backend_tls_sni_name 2016-01-17 01:00:15 +09:00
Tatsuhiro Tsujikawa 34d5382d66 nghttpx: Use VString for DownstreamAddr::host and hostport to remember size 2016-01-17 00:52:41 +09:00
Tatsuhiro Tsujikawa dbbf3a4a10 nghttpx: Refactor TLS hostname match 2016-01-16 23:54:21 +09:00
Tatsuhiro Tsujikawa f25fd09bbb nghttpx: Don't emit :authority if request dones not contain authority info
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).
2016-01-16 21:12:51 +09:00
Tatsuhiro Tsujikawa 7be0217bc0 nghttpx: Simplify xff handling 2016-01-16 16:48:41 +09:00
Tatsuhiro Tsujikawa b202e066fd nghttpx: Don't allow certain characters in host and :scheme header field
For HTTP/2, we do this validation in libnghttp2.  http-parser does
this partially, when it parses URI, but it does not do anything for
Host header field.  libspdylay does not perform anything.  So do some
additional validation for HTTP/1 and SPDY cases.  integration tests
were also added to make sure they work.
2016-01-16 16:00:05 +09:00
Tatsuhiro Tsujikawa 74c77926a8 nghttpx: Refactor and simplify Downstream::rewrite_location_response_header 2016-01-16 12:49:18 +09:00
Tatsuhiro Tsujikawa 25570367b3 nghttpx: Document Forwarded related options 2016-01-16 11:58:02 +09:00
Tatsuhiro Tsujikawa 4c884da222 nghttpx: Reset config when Forwarded related option is used 2016-01-16 11:53:18 +09:00
Tatsuhiro Tsujikawa 41047aece0 nghttpx: Implement Forwarded in HTTP/2 backend 2016-01-16 11:32:36 +09:00
Tatsuhiro Tsujikawa 54f5ea9d6e Update doc 2016-01-16 11:32:36 +09:00
Tatsuhiro Tsujikawa d678c07ddf nghttpx: Allow user to specify static obfuscated value via command-line 2016-01-16 11:32:26 +09:00
Tatsuhiro Tsujikawa 5c3f74b424 nghttpx: Add RFC 7239 Forwarded header field support 2016-01-16 11:32:14 +09:00
Tatsuhiro Tsujikawa 1550d709e0 nghttpx: Use std::mt19937 instead of std::random_device directly 2016-01-15 18:48:14 +09:00
Tatsuhiro Tsujikawa 3c7038dfe1 nghttpx: Simplify
We only change req_.upgrade_request once, so just using else is
suffice.
2016-01-15 00:22:11 +09:00
Tatsuhiro Tsujikawa f8472f4709 nghttpx: Remove backend priority handling code
Currently, this does not do anything useful.
2016-01-15 00:17:40 +09:00
Tatsuhiro Tsujikawa 698f00596d Update doc 2016-01-15 00:05:56 +09:00
Tatsuhiro Tsujikawa 5a8cf94361 nghttpx: Refactor Downstream::response_sent_bodylen_ 2016-01-14 23:54:28 +09:00
Tatsuhiro Tsujikawa 3218c160be nghttpx: Refactor Downstream::response_datalen_ 2016-01-14 23:49:21 +09:00
Tatsuhiro Tsujikawa fa31d0940c nghttpx: Refactor Downstream::request_datalen_ 2016-01-14 23:36:47 +09:00
Tatsuhiro Tsujikawa e7e52b11ce nghttpx: Refactor Downstream::response_bodylen_ 2016-01-14 23:20:44 +09:00
Tatsuhiro Tsujikawa bdef0e0b1a nghttpx: Refactor Downstream::request_bodylen_ 2016-01-14 23:14:58 +09:00
Tatsuhiro Tsujikawa 0a76b45eca nghttpx: Fix bug that key_prev is not updated 2016-01-14 01:05:10 +09:00
Tatsuhiro Tsujikawa 6d6a00f1f5 nghttpx: Return assemble cookie on the fly 2016-01-14 01:05:10 +09:00
Tatsuhiro Tsujikawa 3b8889a2a1 nghttpx: Extract response related fields to Response struct 2016-01-14 01:05:10 +09:00
Tatsuhiro Tsujikawa a7fd37ffdf nghttpx: Remove FieldStore::set_last_{header,trailer}_value
Use FieldStore::append_last_{header,trailer}_value instead.
2016-01-14 01:04:53 +09:00
Tatsuhiro Tsujikawa 919f08eb38 nghttpx: Extract request related fields to Request struct
Header field related functions are now gathered into FieldStore class.
This commit only handles request.  Subsequent commit will do the same
thing for response.
2016-01-14 01:04:32 +09:00
Vernon Tang 6fddefe252 shrpx_worker_process: worker_process_event_loop: Fix FD test.
This fixes a crash in nghttpx when running on IPv6 only.
2016-01-12 17:38:17 +00:00
Tatsuhiro Tsujikawa fe8005327a src: Make util::utos_with_unit and utos_with_funit names shorter 2016-01-11 18:12:31 +09:00
Tatsuhiro Tsujikawa 0697de4691 h2load: Improve readability of traffic numbers 2016-01-11 18:06:26 +09:00
Tatsuhiro Tsujikawa 6566ea7d6b nghttpx: Update doc 2016-01-11 17:36:47 +09:00