diff --git a/main/http.c b/main/http.c
index 9e8735b2cf277e3c197db960ab39a26378ed2485..ca2fe5df986a587f1b43ec9576acbbbaa05387ad 100644
--- a/main/http.c
+++ b/main/http.c
@@ -908,7 +908,7 @@ static void *httpd_helper_thread(void *data)
 		out = ast_http_error(501, "Not Implemented", NULL,
 				     "Attempt to use unimplemented / unsupported method");
 	} else {	/* try to serve it */
-		out = handle_uri(ser, uri, (strcasecmp(buf, "get")) ? AST_HTTP_GET : AST_HTTP_POST,
+		out = handle_uri(ser, uri, (!strcasecmp(buf, "get")) ? AST_HTTP_GET : AST_HTTP_POST,
 				 &status, &title, &contentlength, &vars, &static_content);
 	}