Text of github.com › curl › curl › issues › 6950 as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

CONNECT fails if it can't send the entire request in one go · Issue #6950 · curl/curl · GitHub

Skip to content You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert CONNECT fails if it can't send the entire request in one go #6950 New issue Copy link New issue Copy link Closed Closed CONNECT fails if it can't send the entire request in one go #6950 Copy link Assignees Labels HTTP connecting & proxies Description ustcqidi opened on Apr 24, 2021 Issue body actions I did this There are Proxy which need Kerberos Authentication, but the authentication flow sometimes failed .

This not easy to reproduce. After checking the wireshark captured file and source code of libcurl. We find the possible root cause of the issue. CURLcode Curl_buffer_send(struct dynbuf *in, struct connectdata *conn, /* add the number of sent bytes to this counter */ curl_off_t *bytes_written, /* how much of the buffer contains body data */ size_t included_body_bytes, int socketindex) { ... sendsize = CURLMIN(size, CURL_MAX_WRITE_SIZE); ... else { if((size_t)amount != size) /* We have no continue-send mechanism now, fail.

This can only happen when this function is used from the CONNECT sending function. We currently (stupidly) assume that the whole request is always sent away in the first single chunk. This needs FIXing. */ return CURLE_SEND_ERROR; } } When the Kerberos Auth challenge is bigger than CURL_MAX_WRITE_SIZE (16384) , the request with auth will be failed. (Will be fallbacked to using NTLM in our user's proxy environment.) curl/libcurl version 7.74.0 operating system Windows Activity bagder added connecting & proxies HTTP on Apr 25, 2021 bagder commented on May 3, 2021 bagder on May 3, 2021 Member More actions Any proposal on how to fix this? ustcqidi commented on May 6, 2021 ustcqidi on May 6, 2021 Author More actions @bagder We are fixing this by a workaround, just send the "real" size when sending "proxy-authorization header" here is the pull request #7019 could you please help to review whether is it make sense ?

Thanks. bagder commented on May 6, 2021 bagder on May 6, 2021 Member More actions btw, is this perchance in a CONNECT request? ustcqidi commented on May 6, 2021 ustcqidi on May 6, 2021 Author More actions yes, in the function of CONNECT of http_proxy.c static CURLcode CONNECT(struct connectdata *conn, int sockindex, const char *hostname, int remote_port) bagder commented on May 6, 2021 bagder on May 6, 2021 Member More actions I figured out how to write a test case for this issue that reproduces your problem and shows that http_proxy.c:CONNECT needs to be fixed: test363 This test limits the initial CONNECT request send to 100 bytes, which breaks curl. bagder self-assigned this on May 6, 2021 bagder changed the title [-] Output Kerberos Auth failed if the challenge is bigger than CURL_MAX_WRITE_SIZE [/-] [+] CONNECT fails if it can't send the entire request in one go [/+] on May 6, 2021 ustcqidi commented on May 8, 2021 ustcqidi on May 8, 2021 Author More actions @bagder many thanks bagder closed this as completed in 51c0ebc on May 8, 2021 Sign up for free to join this conversation on GitHub.

Already have an account? Sign in to comment Metadata Metadata Assignees bagder Labels HTTP connecting & proxies Type No type Projects No projects Milestone No milestone Relationships None yet Development No branches or pull requests Issue actions You can’t perform that action at this time.