mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
MEDIUM: stconn/applet: Allow SF_SL_EOS flag alone
During the refactoring on SC/SE flags, it was stated that SE_FL_EOS flag should not be set without on of SE_FL_EOI or SE_FL_ERROR flags. In fact, it is a problem for the QUIC/H3 multiplexer. When a RST_STREAM frame is received, it means no more data will be received from the peer. And this happens before the end of the message (RST_STREAM frame received after the end of the message are ignored). At this stage, it is a problem to report an error because from the QUIC point of view, it is valid. Data may still be sent to the peer. If an error is reported, this will stop the data sending too. In the same idea, the H1 mulitplexer reports an error when the message is truncated because of a read0. But only an EOS flag should be reported in this case, not an error. Fundamentally, it is important to distinguish errors from shuts for reads because some cases are valid. For instance a H1 client can choose to stop uploading data if it received the server response. So, relax tests on SE flags by removing BUG_ON_HOT() on SE_FL_EOS flag. For now, the abort will be handled in the HTTP analyzers.
This commit is contained in:
parent
aa39cc9f42
commit
2437377445
@ -481,8 +481,6 @@ struct task *task_run_applet(struct task *t, void *context, unsigned int state)
|
||||
stream_dump_and_crash(&app->obj_type, read_freq_ctr(&app->call_rate));
|
||||
}
|
||||
|
||||
BUG_ON_HOT((sc_ep_get(sc) & (SE_FL_EOI|SE_FL_EOS|SE_FL_ERROR)) == SE_FL_EOS);
|
||||
|
||||
sc->app_ops->wake(sc);
|
||||
channel_release_buffer(sc_ic(sc), &app->buffer_wait);
|
||||
TRACE_LEAVE(APPLET_EV_PROCESS, app);
|
||||
|
@ -1514,7 +1514,6 @@ static int sc_conn_recv(struct stconn *sc)
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
BUG_ON_HOT((sc_ep_get(sc) & (SE_FL_EOI|SE_FL_EOS|SE_FL_ERROR)) == SE_FL_EOS);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user