[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lib/url.c patch for '/http' malformed url?
- To: xymon (at) xymon.com
- Subject: lib/url.c patch for '/http' malformed url?
- From: Viorel Tabara <viorel.tabara (at) infrabit.net>
- Date: Fri, 8 Oct 2010 16:38:11 -0700
- User-agent: KMail/1.13.5 (Linux/2.6.29-gentoo-r5; KDE/4.4.5; x86_64; ; )
As discussed at http://www.xymon.com/archive/2006/07/msg00515.html:
> On Mon, Jul 31, 2006 at 06:50:19PM +0200, Nicolas wrote:
> > It doesn t like the "%3a" strings.
>
> Apparently not. OK, so this will require a code change. For a
> quick fix, you can edit the lib/url.c file in your Hobbit source.
> Around line 560-570 or so you'll see these lines:
>
> if (poststart) getescapestring(poststart, &bburl->postdata, NULL);
> if (expstart) getescapestring(expstart, &bburl->expdata, NULL);
>
> p = strstr(urlstart, "/http"); <--- find this line
> if (p) {
> proxystart = urlstart;
> urlstart = (p+1);
> *p = '\0';
> }
>
> parse_url(urlstart, bburl->desturl);
>
> Replace the line I've marked with
>
> p = NULL;
>
> That will simply disable the proxy url function, and your original URL
> should work as intended.
>
>
> Regards,
> Henrik
>
Hi Henrik,
Obviously it's not the ":" and I wish I would've searched the mailing list
earlier ;)
# /usr/libexec/hobbit/server/bin/bbtest-net
2010-10-08 14:31:38 Malformed URL - no 'scheme:' in 'http-proxy-tcp'
2010-10-08 14:31:38 Invalid URL for http test - ignored:
cont=postgresql;http://my.athabascau.ca/http-proxy-tcp;0
Changed that to:
cont=postgresql;http://my.athabascau.ca/tohack;0
and it works well.
Do you have any plans to release an update?
Thanks,
Viorel