commit - a22989555dc1675d7f1fad31f4b397ec17d462e2
commit + 5e3e94991603a0927a80cf12e7345dc4a9fba4ea
blob - 32f5b11fdb697d9dfa13493dcb4233c0fb0a8f5d
blob + 7ce53ce038aa1fe95ae993216a80c7a7af157365
--- web/http.c
+++ web/http.c
struct request *req = &clt->req;
size_t len;
uint8_t *endln;
- char *frag, *query, *t, *line;
+ char *frag, *query, *http, *line;
const char *errstr, *m;
while (!clt->reqdone) {
return -1;
}
- if ((t = strchr(line, ' ')) == NULL)
- t = line;
- if (*t != '\0')
- *t++ = '\0';
+ if ((http = strchr(line, ' ')) == NULL)
+ http = line;
+ if (*http != '\0')
+ *http++ = '\0';
if ((query = strchr(line, '?')))
*query = '\0';
clt->req.path = xstrdup(line);
- if (!strcmp(t, "HTTP/1.0"))
+ if (!strcmp(http, "HTTP/1.0"))
clt->req.version = HTTP_1_0;
- else if (!strcmp(t, "HTTP/1.1")) {
+ else if (!strcmp(http, "HTTP/1.1")) {
clt->req.version = HTTP_1_1;
clt->chunked = 1;
} else {
- log_warnx("unknown http version %s", t);
+ log_warnx("unknown http version %s", http);
errno = EINVAL;
return -1;
}
- line = t; /* so that no header below matches */
+ line = http; /* so that no header below matches */
}
if (!strncasecmp(line, "Content-Length:", 15)) {