aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-10-12 12:30:06 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-10-12 12:30:06 +0000
commit2c5e4165916e845ef16b325d1d492a89432940b5 (patch)
treed2d6c271f3c74f04ba39597b48f271c683b508f3 /lib/transfer.c
parent8e91d5de8e4e17ce3d4936cc91171d09726e7bb3 (diff)
better check for absolute URL redirects, adjusted to new Curl_tvdiff() proto
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 2a044a9ea..80a2a75f9 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -859,7 +859,8 @@ Transfer(struct connectdata *c_conn)
conn->upload_bufsize=(long)min(data->progress.ulspeed, BUFSIZE);
}
- if (data->set.timeout && (Curl_tvdiff (now, start) > data->set.timeout)) {
+ if (data->set.timeout &&
+ ((Curl_tvdiff(now, start)/1000) > data->set.timeout)) {
failf (data, "Operation timed out with %d out of %d bytes received",
bytecount, conn->size);
return CURLE_OPERATION_TIMEOUTED;
@@ -984,7 +985,7 @@ CURLcode Curl_perform(struct SessionHandle *data)
data->change.referer_alloc = TRUE; /* yes, free this later */
}
- if(2 != sscanf(newurl, "%15[^:]://%c", prot, &letter)) {
+ if(2 != sscanf(newurl, "%15[^?&/:]://%c", prot, &letter)) {
/***
*DANG* this is an RFC 2068 violation. The URL is supposed
to be absolute and this doesn't seem to be that!