- 13 Mar, 2018 5 commits
-
-
Harris Hancock authored
-
Harris Hancock authored
The relative URL parser allowed certain hosts which the absolute parser correctly weeded out. This change copies two lines from the absolute parser over to the relative parser.
-
Kenton Varda authored
Explicate List element Kinds in generated code
-
Harris Hancock authored
-
Harris Hancock authored
Various versions of MSVC have various troubles deducing the Kind K of a List<T, K>. This change removes any need for the compiler to deduce the Kind, and just hard-codes it into the generated code. Fixes #642.
-
- 26 Feb, 2018 1 commit
-
-
Kenton Varda authored
Extend HttpServer to inform the caller when a connection ends cleanly on drain().
-
- 25 Feb, 2018 1 commit
-
-
Kenton Varda authored
-
- 23 Feb, 2018 2 commits
-
-
Kenton Varda authored
This allows an application which calls drain() to potentially pass off HTTP connections to a new HttpServer afterwards. Without this, the application has no way to know if the connections are in an indeterminant state. This change also makes it OK for an application to fail to read the whole request body. Previously, if an app returned a response without reading the whole request, an exception would eventually be thrown, but potentially not until the client had initiated a new request on the same connection. The client would then get a spurious 500 error.
-
Kenton Varda authored
-
- 17 Feb, 2018 1 commit
-
-
Kenton Varda authored
Escape CMake config var in configure.ac
-
- 16 Feb, 2018 4 commits
-
-
Harris authored
-
Harris authored
-
Harris Hancock authored
Instantiating kj::downcast<T, T>() causes a compile failure with -Werror=address because the compiler knows the dynamic_cast check in downcast() can never fail.
-
Kenton Varda authored
Redesign server-side WebSocket handling.
-
- 13 Feb, 2018 1 commit
-
-
Kenton Varda authored
Previously HttpService had two virtual methods: request() and openWebSocket(). Since it's legitimate to respond to a WebSocket request with a normal HTTP response, openWebSocket() actually had a default implementation that fell back to request(). In the new design, there is only request(). The HttpService detects a WebSocket request by checking the headers. A convenience method, HttpHeaders::isWebSocket(), is provided for this purpose. The new approach makes life much easier for services composed of many layers. For example, you might write an HttpService implementation which performs some URL or header rewrite and then calls on to another HttpService. Previously, every such wrapper would have to separately handle regular requests and WebSockets, usually with near-identical code. Of course, you could factor out the common code, but in practice this often turned out pretty clunky. Worse, developers would often just omit the openWebSocket() implementation since implementing only request() seems to work fine -- until you need a WebSocket, and everything is broken. With the new approach, you have to go somewhat out of your way to write a wrapper layer that breaks WebSockets. I did not apply the same logic to HttpClient because: 1. It's not as easy: HttpClient's methods return results rather than calling a callback on completion, so unifying the methods would have forced request()'s signature to change. Lots of code would need to be updated, and would likely become uglier, as request() would now have to return a `webSocketOrBody` variant type even when the caller isn't asking for a WebSocket. 2. People don't implement custom HttpClients nearly as often as they implement custom HttpServices.
-
- 11 Feb, 2018 3 commits
-
-
Harris Hancock authored
Previously ${CMAKE_CURRENT_LIST_DIR} was expanded (to an empty string) before CapnProtoConfig.cmake.in was configured, resulting in CapnProtoConfig.cmake setting CAPNP_INCLUDE_DIRECTORY to "/../../include", which is obviously wrong.
-
Kenton Varda authored
-
Kenton Varda authored
This is particularly useful for implementing logic to grab the client's IP address and shove it in X-Real-IP.
-
- 08 Feb, 2018 3 commits
-
-
Kenton Varda authored
Fix new compiler warnings.
-
Kenton Varda authored
Add project() call to root CMakeLists.txt
-
Kenton Varda authored
-
- 07 Feb, 2018 3 commits
-
-
Kenton Varda authored
Fix bug in HTTP client connection reuse.
-
Kenton Varda authored
-
Tim Hutt authored
Fixes issue #629
-
- 05 Feb, 2018 5 commits
-
-
Kenton Varda authored
Use application/x-www-form-urlencoded for URL query strings
-
Harris Hancock authored
The main motivation here is to make sure we don't %-escape incoming pluses, but rather interpret them as spaces.
-
Harris Hancock authored
These are almost the same as {encode,decode}UriComponent, differing only in the set of characters they consider reserved, and their treatment of spaces. I wasn't sure what to name them -- encodeWwwForm() seemed least bad. For the encode side, I added a completely separate function -- it seemed like more trouble than it was worth trying to integrate the changes into encodeUriComponent(). For the decode side, I integrated the change (plus-to-space) into decodeBinaryUriComponent(), since that function is a bit longer, and the change was trivial.
-
Kenton Varda authored
Add option to omit default-valued primitives from JSON output.
-
Kenton Varda authored
-
- 04 Feb, 2018 1 commit
-
-
Kenton Varda authored
-
- 01 Feb, 2018 4 commits
-
-
Kenton Varda authored
Fix bug where DNS lookup would fail for very long hostnames.
-
Kenton Varda authored
-
Kenton Varda authored
Add Array::attach() and ArrayPtr::attach().
-
Kenton Varda authored
-
- 31 Jan, 2018 1 commit
-
-
Kenton Varda authored
Array::attach() is like Own::attach(). ArrayPtr::attach() promotes an ArrayPtr to an Array by attaching other objects to it. (Hopefully one of those objects actually owns the underlying array data.)
-
- 30 Jan, 2018 2 commits
-
-
Kenton Varda authored
Allow working around the message size limit
-
Alex Silverstein authored
-
- 29 Jan, 2018 1 commit
-
-
Kenton Varda authored
-
- 26 Jan, 2018 2 commits
-
-
Kenton Varda authored
Treat 'Premature EOF' error on async stream as DISCONNECTED.
-
Kenton Varda authored
Unfortunately TCP does not always distinguish between dirty connection failure and clean connection shutdown. In practice, though, "Premature EOF" errors on streams basically always appear to be due to disconnects (including when the peer crashes).
-