summaryrefslogtreecommitdiffstats
path: root/usr.sbin/relayd/relay_http.c
diff options
context:
space:
mode:
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));
}