diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-04-19 13:15:05 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-04-21 08:20:24 +0200 |
commit | 605e8423554e6c53c7755805f18354973b563b16 (patch) | |
tree | 76108c07cc201a3941f045a56b155cd0dd0832b4 /lib/http.h | |
parent | 252790c5335a221179dfbacb40e065750bbe7544 (diff) | |
download | curl-605e8423554e6c53c7755805f18354973b563b16.tar.gz |
http2: move the stream error field to the per-transfer storage
Storing a stream error in the per-connection struct was an error that lead to
race conditions as subsequent stream handling could overwrite the error code
before it was used for the stream with the actual problem.
Closes #6910
Diffstat (limited to 'lib/http.h')
-rw-r--r-- | lib/http.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http.h b/lib/http.h index 36e2152fe..851e0a382 100644 --- a/lib/http.h +++ b/lib/http.h @@ -211,6 +211,7 @@ struct HTTP { char **push_headers; /* allocated array */ size_t push_headers_used; /* number of entries filled in */ size_t push_headers_alloc; /* number of entries allocated */ + uint32_t error; /* HTTP/2 stream error code */ #endif #if defined(USE_NGHTTP2) || defined(USE_NGHTTP3) bool closed; /* TRUE on HTTP2 stream close */ @@ -281,7 +282,6 @@ struct http_conn { /* list of settings that will be sent */ nghttp2_settings_entry local_settings[3]; size_t local_settings_num; - uint32_t error_code; /* HTTP/2 error code */ #else int unused; /* prevent a compiler warning */ #endif |