~ubuntu-branches/ubuntu/hardy/lighttpd/hardy

« back to all changes in this revision

Viewing changes to src/http-header-glue.c

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2007-09-05 09:30:15 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070905093015-pm98jekbu9ylcd3w
Tags: 1.4.17-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Update maintainer field in debian/control.
  - Build against libgamin-dev rather than libfam-dev (fixes a warning
    during startup)
  - Make sure that upgrades succeed, even if we can't restart lighttpd.
  - Clean environment in init.d script.

Show diffs side-by-side

added added

removed removed

Lines of Context:
279
279
                                                strncpy(buf, con->request.http_if_modified_since, used_len);
280
280
                                                buf[used_len] = '\0';
281
281
 
282
 
                                                strptime(buf, "%a, %d %b %Y %H:%M:%S GMT", &tm);
 
282
                                                if (NULL == strptime(buf, "%a, %d %b %Y %H:%M:%S GMT", &tm)) {
 
283
                                                        con->http_status = 412;
 
284
                                                        return HANDLER_FINISHED;
 
285
                                                }
283
286
                                                t_header = mktime(&tm);
284
287
 
285
288
                                                strptime(mtime->ptr, "%a, %d %b %Y %H:%M:%S GMT", &tm);
323
326
                        strncpy(buf, con->request.http_if_modified_since, used_len);
324
327
                        buf[used_len] = '\0';
325
328
 
326
 
                        strptime(buf, "%a, %d %b %Y %H:%M:%S GMT", &tm);
 
329
                        if (NULL == strptime(buf, "%a, %d %b %Y %H:%M:%S GMT", &tm)) {
 
330
                                /**
 
331
                                 * parsing failed, let's get out of here 
 
332
                                 */
 
333
                                log_error_write(srv, __FILE__, __LINE__, "ss",
 
334
                                                "strptime() failed on", buf);
 
335
                                return HANDLER_GO_ON;
 
336
                        }
327
337
                        t_header = mktime(&tm);
328
338
 
329
339
                        strptime(mtime->ptr, "%a, %d %b %Y %H:%M:%S GMT", &tm);