[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] lib/url.c: monitor urls that contain "/http" in the path



Hi,

hobbit fails to monitor URLs that contain "/http" in the path,
thinking it would be a proxy request. The patch below make the match
more clever: (written for 4.2.0, but applies to 4.3 as well)


--- a/lib/url.c
+++ b/lib/url.c
@@ -563,7 +563,9 @@ char *decode_url(char *testspec, bburl_t
 	if (poststart) getescapestring(poststart, &bburl->postdata, NULL);
 	if (expstart)  getescapestring(expstart, &bburl->expdata, NULL);
 
-	p = strstr(urlstart, "/http");
+	p = strstr(urlstart, "/http://";);
+	if (!p)
+		p = strstr(urlstart, "/https://";);
 	if (p) {
 		proxystart = urlstart;
 		urlstart = (p+1);

Christoph
-- 
cb (at) df7cb.de | http://www.df7cb.de/