Skip to content

Commit

Permalink
Merge pull request h2o#3308 from deweerdt/rs
Browse files Browse the repository at this point in the history
Only forward a RST_STREAM as REFUSED_STREAM if the error code is actually REFUSED_STREAM
  • Loading branch information
kazuho authored Nov 8, 2023
2 parents 3c43e66 + d216abc commit b15937e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/h2o.h
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ struct st_h2o_req_t {
*/
unsigned char reprocess_if_too_early : 1;
/**
* set by the prxy handler if the http2 upstream refused the stream so the client can retry the request
* set by the proxy handler if the http2 upstream refused the stream so the client can retry the request
*/
unsigned char upstream_refused : 1;
/**
Expand Down
3 changes: 2 additions & 1 deletion lib/common/http2client.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,8 @@ static int handle_rst_stream_frame(struct st_h2o_http2client_conn_t *conn, h2o_h
stream = get_stream(conn, frame->stream_id);
if (stream != NULL) {
/* reset the stream */
call_callback_with_error(stream, h2o_httpclient_error_refused_stream);
call_callback_with_error(stream, payload.error_code == -H2O_HTTP2_ERROR_REFUSED_STREAM ? h2o_httpclient_error_refused_stream
: h2o_httpclient_error_io);
close_stream(stream);
}

Expand Down

0 comments on commit b15937e

Please sign in to comment.