From c5eca073b38a7adbbdbce7c58f4020de00828d65 Mon Sep 17 00:00:00 2001 From: leitner Date: Thu, 27 Nov 2008 14:32:29 +0000 Subject: [PATCH] work around broken sqlite download httpd --- scan/scan_httpdate.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scan/scan_httpdate.c b/scan/scan_httpdate.c index 0d641e1..8d9e508 100644 --- a/scan/scan_httpdate.c +++ b/scan/scan_httpdate.c @@ -45,7 +45,8 @@ size_t scan_httpdate(const char *in,time_t *t) { goto done; } c+=scan_ulong(c,&tmp); x.tm_mday=tmp; - ++c; + while (*c==' ') ++c; // work around crappy sqlite download httpd +// ++c; for (i=0; i<12; ++i) if (case_equalb(c,3,months+i*3)) { x.tm_mon=i; break; @@ -59,6 +60,10 @@ size_t scan_httpdate(const char *in,time_t *t) { if (parsetime(c,&x)) return 0; c+=9; if (byte_equal(c,3,"GMT")) c+=3; + if (*c=='+' || *c=='-') { + ++c; + while (*c>='0' && *c<='9') ++c; + } done: x.tm_wday=x.tm_yday=x.tm_isdst=0; #if defined(__dietlibc__) || defined(__GLIBC__)