summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-01-22 01:06:11 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2019-01-22 01:42:39 -0500
commitf77cfe7ca8b3758b5bbe032c05e01e8a424b9f5f (patch)
tree4794db3b1e14d002f465fc5b0faafd61e489953c
parent05d20bcac2b2761fd4d5937e25cb1aa6b3be2fd1 (diff)
downloadlighttpd1.4-f77cfe7ca8b3758b5bbe032c05e01e8a424b9f5f.tar.gz
lighttpd1.4-f77cfe7ca8b3758b5bbe032c05e01e8a424b9f5f.zip
[core] con->uri.scheme is maintained lowercase
con->uri.scheme is maintained lowercase "http" or "https" so scheme string comparisons need not be case-insensitive
-rw-r--r--src/http-header-glue.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/http-header-glue.c b/src/http-header-glue.c
index e8f6a743..6aae9728 100644
--- a/src/http-header-glue.c
+++ b/src/http-header-glue.c
@@ -78,7 +78,7 @@ int http_response_buffer_append_authority(server *srv, connection *con, buffer *
{
unsigned short listen_port = sock_addr_get_port(&our_addr);
unsigned short default_port = 80;
- if (buffer_is_equal_caseless_string(con->uri.scheme, CONST_STR_LEN("https"))) {
+ if (buffer_is_equal_string(con->uri.scheme, CONST_STR_LEN("https"))) {
default_port = 443;
}
if (0 == listen_port) listen_port = srv->srvconf.port;
@@ -1440,8 +1440,7 @@ int http_cgi_headers (server *srv, connection *con, http_cgi_opts *opts, http_cg
rc |= cb(vdata, CONST_STR_LEN("REQUEST_SCHEME"),
CONST_BUF_LEN(con->uri.scheme));
- if (buffer_is_equal_caseless_string(con->uri.scheme,
- CONST_STR_LEN("https"))) {
+ if (buffer_is_equal_string(con->uri.scheme, CONST_STR_LEN("https"))) {
rc |= cb(vdata, CONST_STR_LEN("HTTPS"), CONST_STR_LEN("on"));
}