0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

16 commits

Author SHA1 Message Date
Luca Casonato
20c7300412
refactor(ext/http): remove op_http_read (#16096)
We can use Resource::read_return & op_read instead. This allows HTTP
request bodies to participate in FastStream.

To make this work, `readableStreamForRid` required a change to allow non
auto-closing resources to be handled. This required some minor changes
in our FastStream paths in ext/http and ext/flash.
2022-09-30 07:54:12 +02:00
Divy Srivastava
e64af6260a
feat(ext/flash): add reuseport option on Linux (#16022) 2022-09-28 23:16:29 +05:30
Bartek Iwańczuk
35fe9ee530
fix(flash): panic if response if undefined (#15964)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-09-20 22:08:15 +02:00
Divy Srivastava
b26d0b8a03
fix(ext/flash): don't block requests (#15852) 2022-09-13 22:24:27 +05:30
Divy Srivastava
a3df6bb344
perf(ext/flash): remove string->buffer cache (#15850) 2022-09-10 21:53:00 +05:30
Divy Srivastava
d57f9d560d
fix(ext/flash): use utf8 length as Content-Length (#15793) 2022-09-07 16:21:30 +05:30
Divy Srivastava
20c835407c
fix(ext/flash): retry write failures (#15591) 2022-09-01 18:58:34 +05:30
Bartek Iwańczuk
da10c9c8d1
fix(ext/flash): panic on AddrInUse (#15607) 2022-08-26 08:42:11 +05:30
Bartek Iwańczuk
fb1c7b7dea
fix(unstable): finish HTTP response for 205 and 304 responses (#15584)
This commit fixes "Deno.serve()" API by making sure that
205 and 304 responses end with "\r\n\r\n".
2022-08-24 21:26:57 +02:00
Luca Casonato
f3bde1d53b
feat(ext/flash): split upgradeHttp into two APIs (#15557)
This commit splits `Deno.upgradeHttp` into two different APIs, because
the same API is currently overloaded with two different functions. Flash
requests upgrade immediately, with no need to return a `Response`
object. Instead you have to manually write the response to the socket.
Hyper requests only upgrade once a `Response` object has been sent.

These two behaviours are now split into `Deno.upgradeHttp` and
`Deno.upgradeHttpRaw`. The latter is flash only. The former only
supports hyper requests at the moment, but can be updated to support
flash in the future.

Additionally this removes `void | Promise<void>` as valid return types
for the handler function. If one wants to use `Deno.upgradeHttpRaw`,
they will have to type cast the handler signature - the signature is
meant for the 99.99%, and should not be complicated for the 0.01% that
use `Deno.upgradeHttpRaw()`.
2022-08-24 17:40:57 +05:30
Luca Casonato
4ef08a58df
feat: update Deno.serve function signature (#15563)
This commit changes the `Deno.serve` function signature to be more
versatile and easier to use. It is now a drop in replacement for
std/http's `serve`.

The input validation has also been reworked.
2022-08-24 00:08:56 +02:00
Yoshiya Hinosawa
57d48134d1
fix(ext/flash): fix default onListen callback (#15533) 2022-08-22 17:01:43 +09:00
Yoshiya Hinosawa
fb2aeb79a1
fix(ext/flash): fix listening port (#15519) 2022-08-21 21:27:14 +09:00
Bartek Iwańczuk
5beec3f106
feat(unstable): change Deno.serve() API (#15498)
- Merge "Deno.serve()" and "Deno.serveTls()" API
- Remove first argument and use "fetch" field options instead
- Update type declarations
- Add more documentation
2022-08-19 14:36:01 +02:00
Divy Srivastava
8bdcec1c84
fix(ext/flash): concurrent response streams (#15493) 2022-08-19 10:14:56 +05:30
Divy Srivastava
cd21cff299
feat(ext/flash): An optimized http/1.1 server (#15405)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-08-18 17:35:02 +05:30