Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 8503:b66a2a041d7e quic
QUIC: fixed ngx_http_test_reading() for QUIC streams.
Previously this function generated an error trying to figure out if client shut
down the write end of the connection. The reason for this error was that a
QUIC stream has no socket descriptor. However checking for eof is not the
right thing to do for an HTTP/3 QUIC stream since HTTP/3 clients are expected
to shut down the write end of the stream after sending the request.
Now the function handles QUIC streams separately. It checks if c->read->error
is set. The error flags for c->read and c->write are now set for all streams
when closing the QUIC connection instead of setting the pending_eof flag.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 11 Aug 2020 10:41:39 +0300 |
parents | 0596fe1aee16 |
children | 532fe796b0e2 |
comparison
equal
deleted
inserted
replaced
8502:69033a50c3ae | 8503:b66a2a041d7e |
---|---|
3020 return; | 3020 return; |
3021 } | 3021 } |
3022 | 3022 |
3023 #endif | 3023 #endif |
3024 | 3024 |
3025 #if (NGX_HTTP_QUIC) | |
3026 | |
3027 if (c->qs) { | |
3028 if (c->read->error) { | |
3029 err = 0; | |
3030 goto closed; | |
3031 } | |
3032 | |
3033 return; | |
3034 } | |
3035 | |
3036 #endif | |
3037 | |
3025 #if (NGX_HAVE_KQUEUE) | 3038 #if (NGX_HAVE_KQUEUE) |
3026 | 3039 |
3027 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) { | 3040 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) { |
3028 | 3041 |
3029 if (!rev->pending_eof) { | 3042 if (!rev->pending_eof) { |