summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2016-05-23 14:33:09 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2016-05-23 14:33:09 -0400
commitf3e36ccdbb8a974114c0386010c7a4b17e959dcd (patch)
tree148ee51595818f5e3298edeed2ad6340b58ebb75
parentdf8032a7c88819d8f70bd96f97775d3ef2a41fa6 (diff)
downloadlighttpd-git-f3e36ccdbb8a974114c0386010c7a4b17e959dcd.tar.gz
use buffer_string_set_length() to truncate strings
-rw-r--r--src/request.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/request.c b/src/request.c
index 262a7c04..352c63c2 100644
--- a/src/request.c
+++ b/src/request.c
@@ -248,7 +248,7 @@ int http_request_host_normalize(buffer *b) {
return -1;
}
} /*(else ignore stray colon at string end)*/
- buffer_commit(b, (size_t)(colon - p)); /*(remove port str)*/
+ buffer_string_set_length(b, (size_t)(colon - p)); /*(remove port str)*/
}
if (light_isdigit(*p)) {