-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update CURLOPT_UPLOAD.3 #11300
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The behavior of CURLOPT_UPLOAD differs from what is described in the documentation. The option automatically adds the 'Transfer-Encoding: chunked' header. It also ignores 'Content-Length' header at CURLOPT_HTTPHEADER. The patch makes the documentation clearer.
It always ignores that, in the sense that it doesn't read it nor parses it but just passes it along. |
bagder
approved these changes
Jun 12, 2023
Thanks! |
bagder
added a commit
that referenced
this pull request
Jun 12, 2023
oleg-jukovec
added a commit
to oleg-jukovec/tarantool
that referenced
this pull request
Jun 12, 2023
The description of CURLOPT_UPLOAD [1] is confusing: If you use PUT to an HTTP 1.1 server, you can upload data without knowing the size before starting the transfer if you use chunked encoding. You enable this by adding a header like "Transfer-Encoding: chunked" with CURLOPT_HTTPHEADER. In fact, libcurl adds this header itself. Actually we need to avoid adding this header by libcurl with `CURLOPT_INFILESIZE` [2]. The CURLOPT_UPLOAD documentation has been updated [3]. 1. https://github.com/curl/curl/blob/555bacd6d522bcca497573765056354f4d5d7b33/docs/libcurl/opts/CURLOPT_UPLOAD.3 2. https://curl.se/libcurl/c/httpput.html 3. curl/curl#11300 Closes tarantool#8744 NO_DOC=bugfix
oleg-jukovec
added a commit
to oleg-jukovec/tarantool
that referenced
this pull request
Jun 12, 2023
The description of CURLOPT_UPLOAD [1] is confusing: If you use PUT to an HTTP 1.1 server, you can upload data without knowing the size before starting the transfer if you use chunked encoding. You enable this by adding a header like "Transfer-Encoding: chunked" with CURLOPT_HTTPHEADER. In fact, libcurl adds this header itself. Actually we need to avoid adding this header by libcurl with CURLOPT_INFILESIZE [2]. The CURLOPT_UPLOAD documentation has been updated [3]. 1. https://github.com/curl/curl/blob/555bacd6d522bcca497573765056354f4d5d7b33/docs/libcurl/opts/CURLOPT_UPLOAD.3 2. https://curl.se/libcurl/c/httpput.html 3. curl/curl#11300 Closes tarantool#8744 NO_DOC=bugfix
bagder
added a commit
that referenced
this pull request
Jun 12, 2023
oleg-jukovec
added a commit
to oleg-jukovec/tarantool
that referenced
this pull request
Jun 13, 2023
The description of CURLOPT_UPLOAD [1] is confusing: If you use PUT to an HTTP 1.1 server, you can upload data without knowing the size before starting the transfer if you use chunked encoding. You enable this by adding a header like "Transfer-Encoding: chunked" with CURLOPT_HTTPHEADER. In fact, libcurl adds this header itself. Actually we need to avoid adding this header by libcurl with CURLOPT_INFILESIZE [2]. The CURLOPT_UPLOAD documentation has been updated [3]. 1. https://github.com/curl/curl/blob/555bacd6d522bcca497573765056354f4d5d7b33/docs/libcurl/opts/CURLOPT_UPLOAD.3 2. https://curl.se/libcurl/c/httpput.html 3. curl/curl#11300 Closes tarantool#8744 NO_DOC=bugfix
oleg-jukovec
added a commit
to oleg-jukovec/tarantool
that referenced
this pull request
Jun 21, 2023
The description of CURLOPT_UPLOAD [1] is confusing: If you use PUT to an HTTP 1.1 server, you can upload data without knowing the size before starting the transfer if you use chunked encoding. You enable this by adding a header like "Transfer-Encoding: chunked" with CURLOPT_HTTPHEADER. In fact, libcurl adds this header itself. Actually we need to avoid adding this header by libcurl with CURLOPT_INFILESIZE [2]. The CURLOPT_UPLOAD documentation has been updated [3]. 1. https://github.com/curl/curl/blob/555bacd6d522bcca497573765056354f4d5d7b33/docs/libcurl/opts/CURLOPT_UPLOAD.3 2. https://curl.se/libcurl/c/httpput.html 3. curl/curl#11300 Closes tarantool#8744 NO_DOC=bugfix
Totktonada
pushed a commit
to tarantool/tarantool
that referenced
this pull request
Jun 21, 2023
The description of CURLOPT_UPLOAD [1] is confusing: If you use PUT to an HTTP 1.1 server, you can upload data without knowing the size before starting the transfer if you use chunked encoding. You enable this by adding a header like "Transfer-Encoding: chunked" with CURLOPT_HTTPHEADER. In fact, libcurl adds this header itself. Actually we need to avoid adding this header by libcurl with CURLOPT_INFILESIZE [2]. The CURLOPT_UPLOAD documentation has been updated [3]. 1. https://github.com/curl/curl/blob/555bacd6d522bcca497573765056354f4d5d7b33/docs/libcurl/opts/CURLOPT_UPLOAD.3 2. https://curl.se/libcurl/c/httpput.html 3. curl/curl#11300 Closes #8744 NO_DOC=bugfix
Totktonada
pushed a commit
to tarantool/tarantool
that referenced
this pull request
Jun 21, 2023
The description of CURLOPT_UPLOAD [1] is confusing: If you use PUT to an HTTP 1.1 server, you can upload data without knowing the size before starting the transfer if you use chunked encoding. You enable this by adding a header like "Transfer-Encoding: chunked" with CURLOPT_HTTPHEADER. In fact, libcurl adds this header itself. Actually we need to avoid adding this header by libcurl with CURLOPT_INFILESIZE [2]. The CURLOPT_UPLOAD documentation has been updated [3]. 1. https://github.com/curl/curl/blob/555bacd6d522bcca497573765056354f4d5d7b33/docs/libcurl/opts/CURLOPT_UPLOAD.3 2. https://curl.se/libcurl/c/httpput.html 3. curl/curl#11300 Closes #8744 NO_DOC=bugfix (cherry picked from commit e2e5ef4)
bch
pushed a commit
to bch/curl
that referenced
this pull request
Jul 19, 2023
The behavior of CURLOPT_UPLOAD differs from what is described in the documentation. The option automatically adds the 'Transfer-Encoding: chunked' header if the upload size is unknown. Closes curl#11300
bch
pushed a commit
to bch/curl
that referenced
this pull request
Jul 19, 2023
ptitSeb
pushed a commit
to wasix-org/curl
that referenced
this pull request
Sep 25, 2023
The behavior of CURLOPT_UPLOAD differs from what is described in the documentation. The option automatically adds the 'Transfer-Encoding: chunked' header if the upload size is unknown. Closes curl#11300
ptitSeb
pushed a commit
to wasix-org/curl
that referenced
this pull request
Sep 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The behavior of CURLOPT_UPLOAD differs from what is described in the documentation. The option automatically adds the
'Transfer-Encoding: chunked' header. It also ignores 'Content-Length' header at CURLOPT_HTTPHEADER.
The patch makes the documentation clearer.