Commit Graph

91 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 43d595b7f3 integration: Add tests for healthmon 2016-06-17 00:24:14 +09:00
Tatsuhiro Tsujikawa fd09d8b861 integration: Rename method names 2016-06-14 00:19:27 +09:00
Tatsuhiro Tsujikawa d48d399fb3 nghttpx: Allow query in API endpoint 2016-06-13 22:11:26 +09:00
Tatsuhiro Tsujikawa 81bfb84b32 nghttpx: Rename backend/replace API as backendconfig 2016-06-13 21:17:53 +09:00
Tatsuhiro Tsujikawa 7751f4fb3b Add API integration tests with http/1.1 and SPDY 2016-06-05 23:36:04 +09:00
Tatsuhiro Tsujikawa 8248598601 Add integration tests for nghttpx API endpoint 2016-06-05 22:51:28 +09:00
Tatsuhiro Tsujikawa 13f97ccf45 integration: Workaround runtime error: cgo argument has Go pointer to Go pointer 2016-04-25 23:16:36 +09:00
Tatsuhiro Tsujikawa 7972593586 integration: Fix tests 2016-03-25 00:56:20 +09:00
Tatsuhiro Tsujikawa 7a1e0eb618 integration: Disable tests that sometimes break randomly on travis 2016-03-19 11:50:01 +09:00
Peter Wu 7c55c335cc Merge branches 'master' and 'cmake-updated' into cmake
Update to latest master with appropriate cmake changes at the same time.
2016-03-14 17:26:15 +01:00
Peter Wu e80977c812 integration-tests: do not use recursive target
Older automake (travis, *cough*) do not support the
AM_EXTRA_RECURSIVE_TARGETS option, this results in invoking "it-local"
directly in the travis script which relies on an implementation detail.

Since the "it" target is only used by the integration-tests directory,
just avoid the recursive targets. The README.rst suggests to enter the
integration-tests directory anyway.
2016-03-13 15:40:17 +01:00
Peter Wu bdb6581990 Add CMake-related files to EXTRA_DIST 2016-03-12 01:38:12 +01:00
Peter Wu 5bbcb7148c cmake: update .gitignore files 2016-02-29 16:13:19 +01:00
Tatsuhiro Tsujikawa c2ec73302d integration: Fix tests + `gofmt` 2016-02-29 00:37:51 +09:00
Peter Wu 503f0a29a7 cmake: add integration-tests 2016-02-13 20:13:43 +01:00
Peter Wu 2593036053 integration-tests: support out-of-tree tests
`go test` requires both config.go and the test files in the same
directory. For out-of-tree builds, config.go is normally not placed next
to the source files, so copy the tests to the build directory as a
workaround.
2016-02-13 20:11:50 +01:00
Tatsuhiro Tsujikawa 5a3ca7e700 nghttpx: Disallow user defined static obfuscated string for "for" parameter 2016-01-21 21:05:07 +09:00
Tatsuhiro Tsujikawa acb38b726f nghttpx: Don't quote Forwarded params if it is not required 2016-01-19 22:43:56 +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 198e253e9d integration: Add X-Forwarded-For tests with HTTP/2 backend 2016-01-16 12:25:12 +09:00
Tatsuhiro Tsujikawa f26e213dcd integration: Additional tests for Forwarded header fields 2016-01-16 12:19:19 +09:00
Tatsuhiro Tsujikawa 9f318d1249 integration: Validate status code explicitly
Without this validation, test spuriously succeeds, but in fact it
doesn't.  This might occur if stream is closed with RST_STREAM or
GOAWAY.
2016-01-16 12:06:41 +09:00
Tatsuhiro Tsujikawa f72e496f96 nghttpx: Add integration tests for Forwarded header field support 2016-01-16 11:32:36 +09:00
Tatsuhiro Tsujikawa 5d002ff6ca Fix `make dist` 2015-10-17 00:27:02 +09:00
Tatsuhiro Tsujikawa 509c515575 integration: Update go's http2 package URI 2015-10-09 00:09:45 +09:00
Tatsuhiro Tsujikawa f1eb7638d1 nghttpx: Change mruby script handling
This commit changes nghttpx's mruby script handling.  Previously we
have 2 options to specify the mruby script file to be run on request
and on response.  Now they are merged into 1 option, namely
--mruby-file.  It now must return object.  On request, the object's
on_req(env) method is invoked with env object.  Similarly, on
response, the object's on_resp(env) method is invoked.  The
specification of Env object has not changed.
2015-10-08 23:32:15 +09:00
Tatsuhiro Tsujikawa bb4ab7e333 integration: Robust process termination 2015-09-24 23:43:24 +09:00
Tatsuhiro Tsujikawa 25db23e3c8 integration: Workaround flaky test around signal 2015-09-24 00:11:14 +09:00
Tatsuhiro Tsujikawa 79945c0c45 nghttpx: Robust PROXY protocol implementation 2015-09-07 22:37:25 +09:00
Tatsuhiro Tsujikawa a1bb48770c nghttpx: Add tests for PROXY protocol handling 2015-09-06 23:11:07 +09:00
Tatsuhiro Tsujikawa be77b47ab5 integration: Add ruby scripts to EXTRA_DIST 2015-09-05 19:10:55 +09:00
Tatsuhiro Tsujikawa d348ea3384 integration: Fix test failures 2015-09-05 01:24:43 +09:00
Tatsuhiro Tsujikawa 2222a898a1 integration: Add mruby tests 2015-09-04 02:52:19 +09:00
Tatsuhiro Tsujikawa 891134eba9 Define it and itprep recursive target if AM_EXTRA_RECURSIVE_TARGETS is defined 2015-08-23 23:04:19 +09:00
Tatsuhiro Tsujikawa b78662e506 integration: Fix errors related to host-rewrite 2015-08-09 01:23:58 +09:00
Tatsuhiro Tsujikawa b0b792e735 integration: Add tests for x-forwarded-proto header field 2015-06-16 21:31:47 +09:00
Tatsuhiro Tsujikawa 41dd5f6897 nghttpx: Tokenize request method
We share the same method value with http-parser.  This commit also
returns 501 for unknown request method on HTTP/2 and SPDY frontend.
2015-06-09 23:33:14 +09:00
Tatsuhiro Tsujikawa f9c60d5e9d nghttpx: Return 501 if invalid method is received on h1 frontend 2015-06-09 22:08:49 +09:00
Tatsuhiro Tsujikawa 59e6272ba4 integration: Add WebSocket upgrade test 2015-05-26 23:28:45 +09:00
Tatsuhiro Tsujikawa 1c06cfd29f integration: Use our own copy of golang spdy package
Official golang spdy package is done.  We made a copy of it until we
drop spdy support.
2015-05-23 00:01:45 +09:00
Tatsuhiro Tsujikawa 64b1aae567 integration: Fix TestH2H1Upgrade test failure 2015-05-08 19:35:09 +09:00
Tatsuhiro Tsujikawa 026521b097 integration: Add tests for --header-field-buffer and --max-header-fields 2015-04-29 22:54:25 +09:00
Tatsuhiro Tsujikawa 87cadca3d8 integration: Add HTTP Upgrade test 2015-04-10 21:28:12 +09:00
Tatsuhiro Tsujikawa ff60cc6b71 integration: Don't send Link header field for resource under /css/ 2015-04-08 16:09:02 +09:00
Tatsuhiro Tsujikawa ccea4d42b5 Refactor .gitignore files 2015-03-29 18:40:37 +09:00
Tatsuhiro Tsujikawa 5c31c130bd integration: Add test case for trailer part 2015-03-08 19:31:43 +09:00
Tatsuhiro Tsujikawa c98cf045d6 nghttpx: Use omit minor version in case of HTTP/2 in via header and accesslog 2015-02-24 14:43:01 +09:00
Tatsuhiro Tsujikawa b157d4ebb2 Validate HTTP semantics by default
Previously we did not check HTTP semantics and it is left out for
application.  Although checking is relatively easy, but they are
scattered and error prone.  We have implemented these checks in our
applications and also feel they are tedious.  To make application
development a bit easier, this commit adds basic HTTP semantics
validation to library code.  We do following checks:

server:

* HEADERS is either request header or trailer header.  Other type of
header is disallowed.

client:

* HEADERS is either zero or more non-final response header or final
  response header or trailer header.  Other type of header is
  disallowed.

For both:

* Check mandatory pseudo header fields.
* Make sure that content-length matches the amount of DATA we
  received.

If validation fails, RST_STREAM of type PROTOCOL_ERROR is issued.
2015-02-20 01:01:10 +09:00
Tatsuhiro Tsujikawa 8b4291edcb integration: Add server push test 2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa 45a47936e0 integration: Update doc 2015-02-08 16:10:01 +09:00