quark

quark web server
git clone git://git.suckless.org/quark
Log | Files | Refs | LICENSE

commit 5ffad8984ab0276ece6080d5949196136f3c93f8
parent 1e23378afd8fd19707cd880a638a8112801bf9cc
Author: FRIGN <dev@frign.de>
Date:   Thu,  7 Aug 2014 16:34:46 +0200

Use named indices for the response-entry-array

It was actually sitting right in front of my eyes in the
sighandler-funtion.
This will help sort out ambiguities or mixing up array-indices.

Diffstat:
Mquark.c | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/quark.c b/quark.c @@ -55,11 +55,12 @@ enum { }; static const char *resentry[] = { - "HTTP/1.1 %s\r\nConnection: close\r\nDate: %s\r\nServer: quark-"VERSION"\r\n", - "Content-Length: %lu\r\n", - "Location: %s%s\r\n", - "Content-Type: %s\r\n", - "Last-Modified: %s\r\n" }; + [HEADER] = "HTTP/1.1 %s\r\nConnection: close\r\nDate: %s\r\nServer: quark-"VERSION"\r\n", + [CONTENTLEN] = "Content-Length: %lu\r\n", + [LOCATION] = "Location: %s%s\r\n", + [CONTENTTYPE] = "Content-Type: %s\r\n", + [MODIFIED] = "Last-Modified: %s\r\n" +}; static ssize_t writetext(const char *buf); static ssize_t writedata(const char *buf, size_t buflen);