diff options
author | Colin Hogben <curl@pythontech.co.uk> | 2012-01-04 11:24:49 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-01-18 22:17:46 +0100 |
commit | 51c485342b3be871c8998affc62901a27ffd3d92 (patch) | |
tree | 32b73f996a11afc02f49bdbb8201347eb6571a65 | |
parent | 4563eeb9f43621f137c51c80e3335a3d281b845a (diff) |
Remove bogus optimisation of telnet upload.
Remove wrongly implemented optimisation of telnet upload, apparently
intended to allow the library to avoid manually polling for input.
-rw-r--r-- | src/tool_operate.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index bf73479aa..a6f6f0b90 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -767,11 +767,16 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) /* for uploads */ input.fd = infd; input.config = config; + /* Note that if CURLOPT_READFUNCTION is fread (the default), then + * lib/telnet.c will Curl_poll() on the input file descriptor + * rather then calling the READFUNCTION at regular intervals. + * The circumstances in which it is preferable to enable this + * behaviour, by omitting to set the READFUNCTION & READDATA options, + * have not been determined. + */ my_setopt(curl, CURLOPT_READDATA, &input); /* what call to read */ - if((outfile && !curlx_strequal("-", outfile)) || - !checkprefix("telnet:", this_url)) - my_setopt(curl, CURLOPT_READFUNCTION, tool_read_cb); + my_setopt(curl, CURLOPT_READFUNCTION, tool_read_cb); /* in 7.18.0, the CURLOPT_SEEKFUNCTION/DATA pair is taking over what CURLOPT_IOCTLFUNCTION/DATA pair previously provided for seeking */ |