lib/url.c patch for '/http' malformed url?

Viorel Tabara viorel at athabascau.ca
Sat Oct 9 01:46:33 CEST 2010


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20101008/ac3f01d6/attachment.sig>


More information about the Xymon mailing list