diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-02-08 15:56:10 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-02-09 14:06:28 +0100 |
commit | 115c9e27f53809a254fba44b023bea92f4d4dcd0 (patch) | |
tree | 148e355a72b3cbf932fd3e7bbfb48aeb4c30288a /lib/http.c | |
parent | 0829909ebd8ded89189d2cae699231512962f31c (diff) | |
download | curl-115c9e27f53809a254fba44b023bea92f4d4dcd0.tar.gz |
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
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/http.c b/lib/http.c index 806f639dc..1141102f6 100644 --- a/lib/http.c +++ b/lib/http.c @@ -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; } |