[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] evhttp_decode_uri API bug



On 16 November 2010 15:05, Nick Mathewson <nickm@xxxxxxxxxxxxx> wrote:
> On Tue, Nov 16, 2010 at 6:04 AM, Jeroen Habraken <vexocide@xxxxxxxxx> wrote:
>> Hi,
>>
>> Since I read the HTTP part of libevent is getting some love, I wanted
>> to mention a bug in the evhttp_decode_uri interface. It doesn't return
>> the length of the URI that is decoded, and since the URI could contain
>> "%00" which would be decoded to '\0', one can't rely on strlen. Note
>> that internally (evhttp_decode_uri_internal) it is handled correctly.
>>
>> Regards,
>> Jeroen Habraken
>
> Have a look at the current state of the code in Git: there is an
> evhttp_uridecode and evhttp_uriencode that may do more what you want.

This does indeed fix the problem, though I'd argue the functionality
should be removed from libevent altogether (or not be exposed if it's
needed internally). If one ones to manipulate URI's there are other
libraries better suited, http://uriparser.sourceforge.net/ for
example).

> (Also, the mailing list is now libevent-users@xxxxxxxxxxxxx ; see
> http://archives.seul.org/libevent/users/ for info on subscribing)

Apparently I was already subscribed and I simply screwed up addressing
the initial email, sorry for that.

> cheers,
> --
> Nick
>

Regards,
Jeroen
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.