summaryrefslogtreecommitdiffstats
path: root/usr.sbin/relayd/relay_http.c
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2014-07-17 11:35:26 +0000
committerstsp <stsp@openbsd.org>2014-07-17 11:35:26 +0000
commit1d89351e83a61454208ce87bcdf7198458bf837a (patch)
tree6e5e9cd8b0e089db36245d1149d3022c5ee0c7f3 /usr.sbin/relayd/relay_http.c
parentMissing bounds check in ssl3_get_certificate_request(), was not spotted in (diff)
downloadwireguard-openbsd-1d89351e83a61454208ce87bcdf7198458bf837a.tar.xz
wireguard-openbsd-1d89351e83a61454208ce87bcdf7198458bf837a.zip
Move comment about strcasecmp() to a more suitable spot.
ok reyk benno
Diffstat (limited to 'usr.sbin/relayd/relay_http.c')
-rw-r--r--usr.sbin/relayd/relay_http.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/relayd/relay_http.c b/usr.sbin/relayd/relay_http.c
index bd0449bde27..53d3af6d39c 100644
--- a/usr.sbin/relayd/relay_http.c
+++ b/usr.sbin/relayd/relay_http.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay_http.c,v 1.31 2014/07/14 00:11:12 bluhm Exp $ */
+/* $OpenBSD: relay_http.c,v 1.32 2014/07/17 11:35:26 stsp Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -1133,10 +1133,6 @@ relay_httpmethod_byname(const char *name)
/* Set up key */
method.method_name = name;
- /*
- * RFC 2616 section 5.1.1 says that the method is case
- * sensitive so we don't do a strcasecmp here.
- */
if ((res = bsearch(&method, http_methods,
sizeof(http_methods) / sizeof(http_methods[0]) - 1,
sizeof(http_methods[0]), relay_httpmethod_cmp)) != NULL)
@@ -1166,6 +1162,11 @@ relay_httpmethod_cmp(const void *a, const void *b)
{
const struct http_method *ma = a;
const struct http_method *mb = b;
+
+ /*
+ * RFC 2616 section 5.1.1 says that the method is case
+ * sensitive so we don't do a strcasecmp here.
+ */
return (strcmp(ma->method_name, mb->method_name));
}