1. 13 Jun, 2018 2 commits
  2. 12 Jun, 2018 1 commit
    • Harris Hancock's avatar
      Add limit to readAllBytes()/readAllText() · 49b44f96
      Harris Hancock authored
      Reading an unbounded amount of data from a stream is a potential DoS vector. To manage this risk, readAllText() and readAllBytes() now accept a `limit` parameter. For source backwards-compatibility, this limit defaults to kj::maxValue.
      49b44f96
  3. 09 Jun, 2018 1 commit
    • Kenton Varda's avatar
      Fix chunked body gather-write test. · b3096736
      Kenton Varda authored
      The braced array literals seem to be constructed as temporaries. The test passes in debug builds, but in optimized builds, the arrays have been overwritten by the time they are used.
      b3096736
  4. 07 Jun, 2018 3 commits
  5. 04 Jun, 2018 3 commits
  6. 02 Jun, 2018 1 commit
  7. 30 May, 2018 1 commit
  8. 15 May, 2018 1 commit
  9. 03 May, 2018 1 commit
  10. 02 May, 2018 2 commits
  11. 01 May, 2018 2 commits
  12. 24 Apr, 2018 3 commits
  13. 22 Apr, 2018 1 commit
    • Kenton Varda's avatar
      Implement newHttpClient(HttpService&). · 76104a88
      Kenton Varda authored
      It turns out wrapping an HttpService in an HttpClient is considerably more complicated than vice versa, due to the need for pipes. This commit adds a WebSocket pipe implementation very similar to the recent byte-stream pipe (though considerably simpler since there's no need to deal with mismatched buffer sizes).
      76104a88
  14. 21 Apr, 2018 3 commits
  15. 19 Apr, 2018 1 commit
  16. 18 Apr, 2018 8 commits
  17. 09 Apr, 2018 1 commit
    • Kenton Varda's avatar
      Allow app to send arbitrary Content-Length/Transfer-Encoding in HEAD responses. · be9b18c5
      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).
      be9b18c5
  18. 03 Apr, 2018 1 commit
  19. 02 Apr, 2018 3 commits
  20. 29 Mar, 2018 1 commit
    • Harris Hancock's avatar
      Implement URL fragment, path, and userinfo component encode functions · 084f5526
      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.
      084f5526