- 23 Apr, 2018 1 commit
-
-
Kenton Varda authored
MinGW 7.2 (x86_64) build failed
-
- 22 Apr, 2018 1 commit
-
-
Kenton Varda authored
Implement in-process byte stream pipes.
-
- 21 Apr, 2018 3 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
-
Ivan Shynkarenka authored
-
- 19 Apr, 2018 1 commit
-
-
Ivan Shynkarenka authored
MinGW 7.2 (x86_64) build failed
-
- 18 Apr, 2018 8 commits
-
-
Harris Hancock authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
Yay for fake timers in tests.
-
Kenton Varda authored
This speeds up the test somewhat, but more importantly, it tests the pipe implementation across a variety of usage patterns. This actually uncovered a bug in the HTTP implementation: An HttpClient could inadvertently issue overlapping reads in cases where multiple concurrent (pipelined) requests are made.
-
Kenton Varda authored
This lets you construct an AsyncInputStream / AsyncOutputStream pair that operates entirely within userspace, rather than pushing through a kernel-level pipe. This is far more efficient, avoiding system calls and reducing copies. The pipe does not buffer at all. Instead, it waits for both a read() and a write() call to be active at the same time, and then it fulfills one with the other. This implementation also optimizes pumps. Imagine the situation: you create a pipe; you call pumpTo() on the write end to pump it to some other; then you write to the write end of the pipe. In this case, the write will *directly* call the target stream to which the pipe is being pumped. Hence, adding daisy-chained pipes on top of a final output stream does not incur additional copies of the data. Similarly, tryPumpFrom() is optimized on the read end.
-
Kenton Varda authored
This is necessary when someone other than the promise owner might need to destroy the state a promise is operating on. It comes up when implementing pumpTo() for userland pipes -- cancelling the pump needs to cancel any writes currently passing through the pipe.
-
- 09 Apr, 2018 2 commits
-
-
Kenton Varda authored
Allow app to send arbitrary Content-Length/Transfer-Encoding in HEAD responses.
-
Kenton Varda authored
Previously, the app could control Content-Length by passing `expectedBodySize`. This is great for enabling code that "just works" by handling GET and HEAD requests identically. However, in somewhat more-complicated situations -- especilaly in proxies -- you end up having to write special-case hacks for HEAD requests to deal with the fact that the body is actually empty, but has a non-zero "expected" size. We can make life easier for proxies by allowing the application to directly set the Content-Length and Transfer-Encoding headers in the case of HEAD responses, much like we allow applications to set WebSocket-related headers on non-WebSocket requests/responses. This change actually fixes a bug in Cloudflare Workers where Content-Length is not passed through correctly for HEAD responses. No changes are needed on the Workers side (except adding a test).
-
- 03 Apr, 2018 2 commits
-
-
Kenton Varda authored
Ensure '%' signs get round-tripped in URL path, fragment, userinfo
-
Harris Hancock authored
Our query string encoding function (encodeWwwForm()) was already doing the right thing. I changed the comment in encodeUriPath() to clarify that it's intended to implement a URL class which stores its path in percent-decoded form, not either/or. I was wrong before.
-
- 02 Apr, 2018 6 commits
-
-
Kenton Varda authored
Allow underscores in URL hostnames
-
Harris Hancock authored
We'll need more hostname-related code changes in the future, but for now this will solve a Cloudflare customer's existing bug report.
-
Kenton Varda authored
Distinguish between empty- and null-valued query parameters
-
Harris Hancock authored
-
Kenton Varda authored
Implement various WHATWG URL percent encoding functions
-
Harris Hancock authored
This has the effect of making the authority, path, and fragment components each slightly more permissive in what they don't escape.
-
- 29 Mar, 2018 1 commit
-
-
Harris Hancock authored
According to the WHATWG URL spec, each different component of a URL gets its very own percent encode set, which we've been doing wrong this whole time. In terms of reserved characters, the fragment set is a subset of the path set, which is a subset of the userinfo set, which is a subset of RFC 2396's reserved set.
-
- 23 Mar, 2018 1 commit
-
-
Kenton Varda authored
Make all tests pass on qemu-aarch64
-
- 22 Mar, 2018 3 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
Tested on qemu-aarch64.
-
Kenton Varda authored
It appears that QEMU: - Does not correctly set the MSG_TRUNC flag on recvmsg(). - Crashes when we try to use the IP_PKTINFO ancillary message. So let's skip those tests...
-
- 19 Mar, 2018 3 commits
-
-
Kenton Varda authored
When catching an unknown exception type, at least log the type.
-
Kenton Varda authored
Including cxxabi.h caused build failures because our definition of __cxa_get_globals conflicted with the one in the header (despite being in a different namespace -- apparently becaues of `extern "C"` the compiler considers them to be conflicting). Annoyingly, __cxa_get_globals is only defined by GNU's cxxabi.h and not LLVM's. But LLVM has a nicer __cxa_uncaught_exceptions() that we can perhaps use. Also in C++17 there is a standard function we can call instead.
-
Kenton Varda authored
-
- 15 Mar, 2018 3 commits
-
-
Kenton Varda authored
Support sending GETs with bodies.
-
Kenton Varda authored
Primarily, we want to support proxies passing through such requests blindly. So, I didn't add any new API for this, just added some hacks so that things "just work" when proxying.
-
Kenton Varda authored
Fix bugs in relative URL parser
-
- 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.
-