aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2008-05-10 20:40:13 +0000
committerJason Woodward2008-05-10 20:40:13 +0000
commit27282a8c4c970055d96639d8180627b2dfa02beb (patch)
tree7c386c81bf09391f3f27dc141ad51ef09bce1eac /src
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.
Diffstat (limited to 'src')
-rw-r--r--src/curl.c2
1 files changed, 1 insertions, 1 deletions
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 */