Skip to content

Conversation

@cmb69
Copy link
Member

@cmb69 cmb69 commented Mar 2, 2020

Unfortunately, some Webservers (e.g. IIS) do not implement the (F)CGI
specifications correctly wrt. chunked uploads (i.e. Transfer-encoding:
chunked), but instead pass -1 as CONTENT_LENGTH to the CGI
application. However, our (F)CFI SAPIs (i.e. cgi and cgi-fcgi) do not
support this.

Therefore we try to retrieve the stream size in advance and pass it to
curl_mime_data_cb() to prevent libcurl from doing chunked uploads.
This is basically the same approach that curl_mime_filedata()
implements.

Unfortunately, some Webservers (e.g. IIS) do not implement the (F)CGI
specifications correctly wrt. chunked uploads (i.e. Transfer-encoding:
chunked), but instead pass -1 as CONTENT_LENGTH to the CGI
application. However, our (F)CFI SAPIs (i.e. cgi and cgi-fcgi) do not
support this.

Therefore we try to retrieve the stream size in advance and pass it to
`curl_mime_data_cb()` to prevent libcurl from doing chunked uploads.
This is basically the same approach that `curl_mime_filedata()`
implements.
@cmb69 cmb69 requested a review from nikic March 2, 2020 16:54
@cmb69
Copy link
Member Author

cmb69 commented Mar 2, 2020

This is an alternative to PR #5219.

@cmb69
Copy link
Member Author

cmb69 commented Mar 2, 2020

Thanks! Applied as fc8b3ab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants