aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/lib/url.c b/lib/url.c
index 0de87a824..21b869efa 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3604,18 +3604,24 @@ static CURLcode CreateConnection(struct SessionHandle *data,
***********************************************************************/
#ifndef CURL_DISABLE_FILE
if (strequal(conn->protostr, "FILE")) {
- /* anyway, this is supposed to be the connect function so we better
- at least check that the file is present here! */
- result = Curl_file_connect(conn);
-
- /* Setup a "faked" transfer that'll do nothing */
- if(CURLE_OK == result) {
- conn->data = data;
- conn->bits.tcpconnect = TRUE; /* we are "connected */
- ConnectionStore(data, conn);
-
- result = Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */
- -1, NULL); /* no upload */
+ /* this is supposed to be the connect function so we better at least check
+ that the file is present here! */
+ result = Curl_file_connect(conn);
+
+ /* Setup a "faked" transfer that'll do nothing */
+ if(CURLE_OK == result) {
+ conn->data = data;
+ conn->bits.tcpconnect = TRUE; /* we are "connected */
+
+ ConnectionStore(data, conn);
+
+ result = setup_range(data);
+ if(result)
+ return result;
+
+ result = Curl_setup_transfer(conn, -1, -1, FALSE,
+ NULL, /* no download */
+ -1, NULL); /* no upload */
}
return result;