[master] 1679bbe Simplify
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Tue Feb 23 21:04:43 CET 2016
commit 1679bbedcd16784e62055d3560e22011785cda48
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue Feb 23 21:02:48 2016 +0100
Simplify
diff --git a/bin/varnishd/http1/cache_http1_proto.c b/bin/varnishd/http1/cache_http1_proto.c
index 7d1e9b1..412370a 100644
--- a/bin/varnishd/http1/cache_http1_proto.c
+++ b/bin/varnishd/http1/cache_http1_proto.c
@@ -369,9 +369,8 @@ HTTP1_DissectRequest(struct http_conn *htc, struct http *hp)
!strncasecmp(hp->hd[HTTP_HDR_URL].b, "https://", 8))
b = hp->hd[HTTP_HDR_URL].b + 8;
if (b) {
- for (e = b; *e != '/' && *e != '\0'; e++)
- continue;
- if (*e == '/') {
+ e = strchr(b, '/');
+ if (e) {
http_Unset(hp, H_Host);
http_PrintfHeader(hp, "Host: %.*s", (int)(e - b), b);
hp->hd[HTTP_HDR_URL].b = e;
More information about the varnish-commit
mailing list