mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:03:34 +03:00
ftp: add 'prefer_ascii' to the transfer state struct
... and make sure the code never updates 'set.prefer_ascii' as it breaks handle reuse which should use the setting as the user specified it. Added test 1569 to verify: it first makes an FTP transfer with ';type=A' and then another without type on the same handle and the second should then use binary. Previously, curl failed this. Closes #6578
This commit is contained in:
parent
0829909ebd
commit
115c9e27f5
9 changed files with 146 additions and 21 deletions
|
|
@ -1702,7 +1702,7 @@ CURLcode Curl_http_compile_trailers(struct curl_slist *trailers,
|
|||
|
||||
if(
|
||||
#ifdef CURL_DO_LINEEND_CONV
|
||||
(handle->set.prefer_ascii) ||
|
||||
(handle->state.prefer_ascii) ||
|
||||
#endif
|
||||
(handle->set.crlf)) {
|
||||
/* \n will become \r\n later on */
|
||||
|
|
@ -2209,7 +2209,7 @@ CURLcode Curl_http_target(struct Curl_easy *data,
|
|||
}
|
||||
if(!type) {
|
||||
result = Curl_dyn_addf(r, ";type=%c",
|
||||
data->set.prefer_ascii ? 'a' : 'i');
|
||||
data->state.prefer_ascii ? 'a' : 'i');
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue