Remove dead assignment and unused vars.

This commit is contained in:
Joris Vink 2021-09-17 19:49:32 +02:00
parent 351eec7eb4
commit bcfb79a389
1 changed files with 3 additions and 3 deletions

View File

@ -1906,9 +1906,9 @@ http_request_new(struct connection *c, const char *host,
{
struct kore_domain *dom;
struct http_request *req;
size_t qsoff;
char *p, *hp;
int m, flags, exists;
size_t hostlen, pathlen, qsoff;
if (http_request_count >= http_request_limit) {
http_error_response(c, HTTP_STATUS_SERVICE_UNAVAILABLE);
@ -1918,12 +1918,12 @@ http_request_new(struct connection *c, const char *host,
kore_debug("http_request_new(%p, %s, %s, %s, %s)", c, host,
method, path, version);
if ((hostlen = strlen(host)) >= KORE_DOMAINNAME_LEN - 1) {
if (strlen(host) >= KORE_DOMAINNAME_LEN - 1) {
http_error_response(c, HTTP_STATUS_BAD_REQUEST);
return (NULL);
}
if ((pathlen = strlen(path)) >= HTTP_URI_LEN - 1) {
if (strlen(path) >= HTTP_URI_LEN - 1) {
http_error_response(c, HTTP_STATUS_REQUEST_URI_TOO_LARGE);
return (NULL);
}