http: fix "part of conditional expression is always false"
[CWE-570] V560: A part of conditional expression is always false: conn->bits.authneg. [CWE-570] V560: A part of conditional expression is always false: conn->handler->protocol & (0 | 0). https://pvs-studio.com/en/docs/warnings/v560/ Closes #10399
This commit is contained in:
parent
63c53ea627
commit
e1f78ce25b
@ -2396,8 +2396,7 @@ CURLcode Curl_http_bodysend(struct Curl_easy *data, struct connectdata *conn,
|
||||
we don't upload data chunked, as RFC2616 forbids us to set both
|
||||
kinds of headers (Transfer-Encoding: chunked and Content-Length) */
|
||||
if(http->postsize != -1 && !data->req.upload_chunky &&
|
||||
(conn->bits.authneg ||
|
||||
!Curl_checkheaders(data, STRCONST("Content-Length")))) {
|
||||
(!Curl_checkheaders(data, STRCONST("Content-Length")))) {
|
||||
/* we allow replacing this header if not during auth negotiation,
|
||||
although it isn't very wise to actually set your own */
|
||||
result = Curl_dyn_addf(r,
|
||||
@ -3171,8 +3170,10 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
|
||||
}
|
||||
|
||||
result = Curl_http_cookies(data, conn, &req);
|
||||
#ifdef USE_WEBSOCKETS
|
||||
if(!result && conn->handler->protocol&(CURLPROTO_WS|CURLPROTO_WSS))
|
||||
result = Curl_ws_request(data, &req);
|
||||
#endif
|
||||
if(!result)
|
||||
result = Curl_add_timecondition(data, &req);
|
||||
if(!result)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user