aboutsummaryrefslogtreecommitdiffstats
path: root/httpd.h
diff options
context:
space:
mode:
authorkraxel <kraxel>2004-06-10 09:45:50 +0000
committerkraxel <kraxel>2004-06-10 09:45:50 +0000
commit7a9d340846d49f5816c0b2c869ad91b144f7c5c3 (patch)
treeba90d0d7d289336b8f45976bef033cce06734963 /httpd.h
parentc73269a22b7fdbff11064ef0ab182a4705bf8024 (diff)
downloadwebfs-7a9d340846d49f5816c0b2c869ad91b144f7c5c3.tar.gz
- rewrite timestamp handling: strcmp rfc1123 dates instead of attempt
to parse the date strings.
Diffstat (limited to 'httpd.h')
-rw-r--r--httpd.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/httpd.h b/httpd.h
index 31e0bef..d607860 100644
--- a/httpd.h
+++ b/httpd.h
@@ -31,9 +31,11 @@
#define S1(str) #str
#define S(str) S1(str)
+#define RFC1123 "%a, %d %b %Y %H:%M:%S GMT"
+
struct DIRCACHE {
char path[1024];
- time_t mtime;
+ char mtime[40];
time_t add;
char *html;
int length;
@@ -72,9 +74,9 @@ struct REQUEST {
int major,minor; /* http version */
char auth[64];
struct strlist *header;
- time_t if_modified;
- time_t if_unmodified;
- time_t if_range;
+ char *if_modified;
+ char *if_unmodified;
+ char *if_range;
char *range_hdr;
int ranges;
off_t *r_start;
@@ -92,6 +94,7 @@ struct REQUEST {
off_t lbody;
int bfd; /* file descriptor */
struct stat bst; /* file info */
+ char mtime[40]; /* RFC 1123 */
off_t written;
int head_only;
int rh,rb;
@@ -210,7 +213,7 @@ extern char *h501,*b501;
void mkerror(struct REQUEST *req, int status, int ka);
void mkredirect(struct REQUEST *req);
-void mkheader(struct REQUEST *req, int status, time_t mtime);
+void mkheader(struct REQUEST *req, int status);
void mkcgi(struct REQUEST *req, char *status, struct strlist *header);
void write_request(struct REQUEST *req);