BUG/MINOR: h3: do not report transfer as aborted on preemptive response
HTTP/3 specification allows a server to emit the entire response even if only a partial request was received. In particular, this happens when request STREAM FIN is delayed and transmitted in an empty payload frame. In this case, qcc_abort_stream_read() was used by HTTP/3 layer to emit a STOP_SENDING. Remaining received data were not transmitted to the stream layer as they were simply discared. However, this prevents FIN transmission to the stream layer. This causes the transfer to be considered as prematurely closed, resulting in a cL-- log line status. This is misleading to users which could interpret it as if the response was not sent. To fix this, disable STOP_SENDING emission on full preemptive reponse emission. Rx channel is kept opened until the client closes it with either a FIN or a RESET_STREAM. This ensures that the FIN signal can be relayed to the stream layer, which allows the transfer to be reported as completed. This should be backported up to 2.9.
This commit is contained in:
parent
0ae7a5d672
commit
f6648d478b
7
src/h3.c
7
src/h3.c
@ -2100,6 +2100,12 @@ static size_t h3_snd_buf(struct qcs *qcs, struct buffer *buf, size_t count)
|
|||||||
* request, clients SHOULD continue sending the content of the request
|
* request, clients SHOULD continue sending the content of the request
|
||||||
* and close the stream normally.
|
* and close the stream normally.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* TODO deactivate for now STOP_SENDING emission on complete response.
|
||||||
|
* In particular, this may prevent FIN transmission to stream layer
|
||||||
|
* which results in transfers reported as prematurely aborted (cL--).
|
||||||
|
*/
|
||||||
|
#if 0
|
||||||
if (unlikely((htx->flags & HTX_FL_EOM) && htx_is_empty(htx)) &&
|
if (unlikely((htx->flags & HTX_FL_EOM) && htx_is_empty(htx)) &&
|
||||||
!qcs_is_close_remote(qcs)) {
|
!qcs_is_close_remote(qcs)) {
|
||||||
/* Generate a STOP_SENDING if full response transferred before
|
/* Generate a STOP_SENDING if full response transferred before
|
||||||
@ -2108,6 +2114,7 @@ static size_t h3_snd_buf(struct qcs *qcs, struct buffer *buf, size_t count)
|
|||||||
qcs->err = H3_ERR_NO_ERROR;
|
qcs->err = H3_ERR_NO_ERROR;
|
||||||
qcc_abort_stream_read(qcs);
|
qcc_abort_stream_read(qcs);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
out:
|
out:
|
||||||
htx_to_buf(htx, buf);
|
htx_to_buf(htx, buf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user