summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2008-05-10 20:40:13 +0000
committerJason Woodward2008-05-10 20:40:13 +0000
commit27282a8c4c970055d96639d8180627b2dfa02beb (patch)
tree7c386c81bf09391f3f27dc141ad51ef09bce1eac
parent541a885e42d838562eeab24b1990c45fbab0b4c9 (diff)
downloadslapt-get-27282a8c4c970055d96639d8180627b2dfa02beb.tar.gz
only accept content length instead of last modified date if url is NOT ftp. This enforces 404 errors for those sources that like to have custom 404 pages.
-rw-r--r--ChangeLog5
-rw-r--r--src/curl.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b159a0..143e613 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
-0.9.12e May 05, 2008
+0.9.12e May 10, 2008
+ * only accept content length instead of last modified date if url is NOT ftp.
+ This enforces 404 errors for those sources that like to have custom 404
+ pages.
* make --ignore-dep ignore conflicts on upgrade
* test updates
* Romanian translation by Reteaua PTM.
diff --git a/src/curl.c b/src/curl.c
index 2fa3288..d213420 100644
--- a/src/curl.c
+++ b/src/curl.c
@@ -469,7 +469,7 @@ char *slapt_head_mirror_data(const char *wurl,const char *file)
if (request_header_ptr == NULL) {
/* this is ftp, in which case the Content-Length will have to do */
request_header_ptr = strstr(head_data,"Content-Length");
- if (request_header_ptr == NULL) {
+ if (request_header_ptr == NULL || strstr(wurl,"ftp") == NULL) {
free(head_data);
return NULL;
}/* give up finally */