aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-08-02 14:09:08 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-08-02 14:09:08 +0000
commit6f750f3b575bce420666b8115c1db7897dae5f7a (patch)
tree5cdf15160840401d1871ee3917e90bdd1a768b1a /lib/url.c
parent5a6dcdc36c33e15f1b32f08bf885ec5d48b27aec (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/url.c')
-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;