Commit Graph

4446 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa a23c9244d4 Make sure that upgraded response can be received from server 2016-01-15 17:03:13 +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 543f2d58fc Merge branch 'nghttpx-refactor-downstream' 2016-01-14 01:06:45 +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
Tatsuhiro Tsujikawa 6cc5d71ffe Merge branch 'ploppy-fix_ipv6_crash' 2016-01-13 22:55:59 +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 15ea11d5db Fix bug that HTTP upgrade was not working 2016-01-12 21:05:05 +09: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 afc6f556d1 Update doc 2016-01-11 17:47:46 +09:00
Tatsuhiro Tsujikawa 6566ea7d6b nghttpx: Update doc 2016-01-11 17:36:47 +09:00
Tatsuhiro Tsujikawa 863addcd5a Update man pages 2016-01-11 16:23:32 +09:00
Tatsuhiro Tsujikawa bb6f842b37 Check request/response submission error based side of session
Disallow request from server, and response from client respectively.
When the violation is detected, return NGHTTP2_ERR_PROTO from
nghttp2_submit_request, nghttp2_submit_response,
nghttp2_submit_headers.

We also did some refactoring, and now self-dependency detection is
placed where it is only required.
2016-01-11 16:18:39 +09:00
Tatsuhiro Tsujikawa 8f225ae88d Fix broken test_nghttp2_session_pop_next_ob_item 2016-01-11 00:46:44 +09:00
Tatsuhiro Tsujikawa 9cea986819 Strict outgoing idle stream detection
Previously, we use session->next_stream_id to detect that given stream
ID was idle or not.  But this was suboptimal, since it was updated
when stream ID was assigned, and it did not necessarily mean that it
actually has been sent to the peer.  Now we introduced
session->sent_stream_id, which only updated when HEADERS/PUSH_PROMISE
has sent.  Using sent_stream_id instead of next_stream_id tightens
idle stream detection, and misbehaved peer which sends frame with
stream ID that has not been generated.

This commit also overhauls test code which involves opening streams.
Now we have some wrapper functions for nghttp2_session_open_stream()
which also take care of updating next_stream_id and
last_recv_stream_id.  They are crucial for some tests.
2016-01-11 00:31:52 +09:00
Tatsuhiro Tsujikawa a7ec90506f Happy new year! 2016-01-09 18:28:38 +09:00
Tatsuhiro Tsujikawa c58a621fc7 Add LICENSE file to point to COPYING
Some people feel uncomfortable when they could not find LICENSE file.
2016-01-09 18:26:45 +09:00
Tatsuhiro Tsujikawa b64fc3ac49 nghttpd: Add --no-content-length option to omit content-length in response 2016-01-07 22:51:47 +09:00
Tatsuhiro Tsujikawa 027256d0b1 h2load: Distribute MAX_SAMPLES across workers 2016-01-07 22:41:37 +09:00
Tatsuhiro Tsujikawa 425c794f89 h2load: Rename MAX_STATS as MAX_SAMPLES 2016-01-07 22:21:39 +09:00
Tatsuhiro Tsujikawa acac5ec6ea h2load: Remove "auto" for -m option
Because http/1.1 support, default "auto" behaviour of -m option is not
desirable, since it is used as HTTP pipelining, and it is not used in
practice.
2016-01-06 23:16:53 +09:00
Tatsuhiro Tsujikawa 13bd566eb7 h2load: Remove RequestStat ctor 2016-01-06 23:10:46 +09:00
Tatsuhiro Tsujikawa a52920cec0 h2load: Perform Sampling for client as well 2016-01-06 23:03:37 +09:00
Tatsuhiro Tsujikawa 9cbb8174bb h2load: Refactor systematic sampling method 2016-01-06 22:43:09 +09:00
Tatsuhiro Tsujikawa 23ac0429be h2load: Show progress in rate mode 2016-01-06 00:04:14 +09:00
Tatsuhiro Tsujikawa 7ed26afe75 h2load: Delete Client when it finished 2016-01-06 00:04:14 +09:00
Tatsuhiro Tsujikawa 60bbb5cae0 h2load: Perform sampling for request timings to reduce memory consumption 2016-01-06 00:04:14 +09:00
Tatsuhiro Tsujikawa da85910028 Merge pull request #472 from kumagi/fix-typo
fix typos in documents.
2016-01-06 00:03:23 +09:00
kumagi f3a37b2ef1 fix typos: heder->header alreay->already reponse->response 2016-01-05 22:19:33 +09:00
Tatsuhiro Tsujikawa 2f50bc1b3c nghttpx: Take into account of trailers when applying max_header_fields 2016-01-05 16:47:44 +09:00
Tatsuhiro Tsujikawa 848f8fbe54 nghttpx: Don't apply max_header_fields and header_field_buffer limit to response
We modeled max_header_fields and header_field_buffer limit from Apache
configuration directives.  In Apache, they are only applied to request
header fields, while we applied both request and response.  Since
nghttpx is used as reverse proxy and backend server is relatively
"trusted", this commit removes the application to response header
fields.
2016-01-05 16:44:44 +09:00
Tatsuhiro Tsujikawa 4f06ccd17d Add -ldl to APPLDFLAGS for static openssl linking 2015-12-31 00:22:26 +09:00
Tatsuhiro Tsujikawa 3a9cb85d7a Add test to make sure idle streams are reduced 2015-12-26 00:30:55 +09:00
Tatsuhiro Tsujikawa 8716dd05d4 Return error from nghttp2_submit_{headers,request} when self dependency is made
Return NGHTTP2_ERR_INVALID_ARGUMENT from nghttp2_submit_headers() if
given stream ID and pri_spec->stream_id are the same (thus trying to
depend on itself).

Also return NGHTTP2_ERR_INVALID_ARGUMENT from nghttp2_submit_request()
and nghttp2_submit_headers() with stream_id == 1, when new stream ID
equals to pri_spec->stream_id.

Previously, these cases are not checked, and just sent to peer.
2015-12-25 21:37:18 +09:00
Tatsuhiro Tsujikawa dd4d549dc1 asio: Rename http2::get_io_services() as http2::io_services()
The naming convention in asio lib does not use get_something.
2015-12-25 21:06:25 +09:00
Tatsuhiro Tsujikawa 486dba8d8a nghttpx: Strict validation for header fields given in configuration 2015-12-25 20:57:24 +09:00
Tatsuhiro Tsujikawa e677e37876 Merge pull request #461 from ayanamist/ayanamist-patch-1
header value should not be inp_strlower
2015-12-25 20:47:11 +09:00
ayanamist 5ec6066fdd header value should not be inp_strlower
http header keys are case-insensitive, but header values are case-sensitive, so it should not be changed.
2015-12-25 11:03:55 +08:00
Tatsuhiro Tsujikawa 894c1bd02e Create idle stream on client side
With the presence of idle stream related API (e.g.,
nghttp2_create_idle_stream()), it is more predictable for client to
create idle streams with its dependency to another idle stream.
Previously, we didn't create complete parent idle stream in this case.
Now we create idle streams as we do on server side.
2015-12-25 00:10:37 +09:00