diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-08-02 14:09:08 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-08-02 14:09:08 +0000 |
commit | 6f750f3b575bce420666b8115c1db7897dae5f7a (patch) | |
tree | 5cdf15160840401d1871ee3917e90bdd1a768b1a /lib | |
parent | 5a6dcdc36c33e15f1b32f08bf885ec5d48b27aec (diff) |
Dmitriy Sergeyev reported a regression: resumed file:// transfers broke
after 7.16.2. This is much due to the different treatment file:// gets
internally, but now I added test 231 to make it less likely to happen again
without us noticing!
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.c | 30 |
1 files changed, 18 insertions, 12 deletions
@@ -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; |