Mercurial > hg > nginx-quic
comparison src/event/quic/ngx_event_quic_streams.c @ 8788:47f45a98f892 quic
QUIC: fixed handling STREAM FIN.
Previously, when a STREAM FIN frame with no data bytes was received after all
prior stream data were already read by the application layer, the frame was
ignored and eof was not reported to the application.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 11 Jan 2022 18:57:02 +0300 |
parents | d78972cf4bac |
children | 5acd0d89d8c2 |
comparison
equal
deleted
inserted
replaced
8787:aa3c59524e2f | 8788:47f45a98f892 |
---|---|
1072 if (qs->final_size != (uint64_t) -1 && last > qs->final_size) { | 1072 if (qs->final_size != (uint64_t) -1 && last > qs->final_size) { |
1073 qc->error = NGX_QUIC_ERR_FINAL_SIZE_ERROR; | 1073 qc->error = NGX_QUIC_ERR_FINAL_SIZE_ERROR; |
1074 return NGX_ERROR; | 1074 return NGX_ERROR; |
1075 } | 1075 } |
1076 | 1076 |
1077 if (last <= qs->recv_offset) { | 1077 if (last < qs->recv_offset) { |
1078 return NGX_OK; | 1078 return NGX_OK; |
1079 } | 1079 } |
1080 | 1080 |
1081 if (f->offset < qs->recv_offset) { | 1081 if (f->offset < qs->recv_offset) { |
1082 ngx_quic_trim_chain(frame->data, qs->recv_offset - f->offset); | 1082 ngx_quic_trim_chain(frame->data, qs->recv_offset - f->offset); |