summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2019-03-04 10:59:05 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2019-03-04 10:59:05 +0000
commit3ad282f87f151db292ce4d635196bb24750edaf8 (patch)
treef3af917b91752c1e6e29db0a2f99aceef4443ff6 /usr.sbin
parenta0b71be87a346f73a843a72fe264d3c3945cb951 (diff)
According to RFC 7230 Section 3.2 header field names are
case-insensitive. Pointed out by "Wolf" ( wolf at wolfsden.cz ), thanks! OK benno
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/acme-client/http.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/acme-client/http.c b/usr.sbin/acme-client/http.c
index 79330ae2905..22b7a717156 100644
--- a/usr.sbin/acme-client/http.c
+++ b/usr.sbin/acme-client/http.c
@@ -1,4 +1,4 @@
-/* $Id: http.c,v 1.24 2018/11/29 14:25:07 tedu Exp $ */
+/* $Id: http.c,v 1.25 2019/03/04 10:59:04 florian Exp $ */
/*
* Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -442,9 +442,8 @@ http_head_get(const char *v, struct httphead *h, size_t hsz)
size_t i;
for (i = 0; i < hsz; i++) {
- if (strcmp(h[i].key, v))
- continue;
- return &h[i];
+ if (strcasecmp(h[i].key, v) == 0)
+ return &h[i];
}
return NULL;
}