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.
This commit is contained in:
parent
1e23378afd
commit
5ffad8984a
1 changed files with 6 additions and 5 deletions
11
quark.c
11
quark.c
|
@ -55,11 +55,12 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *resentry[] = {
|
static const char *resentry[] = {
|
||||||
"HTTP/1.1 %s\r\nConnection: close\r\nDate: %s\r\nServer: quark-"VERSION"\r\n",
|
[HEADER] = "HTTP/1.1 %s\r\nConnection: close\r\nDate: %s\r\nServer: quark-"VERSION"\r\n",
|
||||||
"Content-Length: %lu\r\n",
|
[CONTENTLEN] = "Content-Length: %lu\r\n",
|
||||||
"Location: %s%s\r\n",
|
[LOCATION] = "Location: %s%s\r\n",
|
||||||
"Content-Type: %s\r\n",
|
[CONTENTTYPE] = "Content-Type: %s\r\n",
|
||||||
"Last-Modified: %s\r\n" };
|
[MODIFIED] = "Last-Modified: %s\r\n"
|
||||||
|
};
|
||||||
|
|
||||||
static ssize_t writetext(const char *buf);
|
static ssize_t writetext(const char *buf);
|
||||||
static ssize_t writedata(const char *buf, size_t buflen);
|
static ssize_t writedata(const char *buf, size_t buflen);
|
||||||
|
|
Loading…
Reference in a new issue