Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-02-13 Thread Trong Long Dinh
okie, thanks On Sun, Feb 13, 2011 at 12:48 PM, Nick Mathewson wrote: > On Thu, Jan 13, 2011 at 12:29 AM, Trong Long Dinh > wrote: > > I haven't read RFC 3986. Maybe | _is_ an invalid URI character. But what > > happen when i want pass a param contain '|' character. If it's a special > > characte

Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-02-12 Thread Nick Mathewson
On Thu, Jan 13, 2011 at 12:29 AM, Trong Long Dinh wrote: > I haven't read RFC 3986. Maybe | _is_ an invalid URI character. But what > happen when i want pass a param contain '|' character. If it's a special > character, then firefox have to encode it before send to server. Okay, there's code to t

Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-01-19 Thread Adrian Chadd
On Wed, Jan 19, 2011, Nick Mathewson wrote: > On Thu, Jan 13, 2011 at 12:34 AM, Adrian Chadd wrote: > > It's best to assume browsers don't do the right thing in 100% of cases. > > > > (Been there, done that with Squid..) > > Ick. Okay, what does Squid (or some other sensible application) > assum

Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-01-19 Thread Adrian Chadd
On Wed, Jan 19, 2011, Nick Mathewson wrote: > On Thu, Jan 13, 2011 at 12:34 AM, Adrian Chadd wrote: > > It's best to assume browsers don't do the right thing in 100% of cases. > > > > (Been there, done that with Squid..) > > Ick. Okay, what does Squid (or some other sensible application) > assum

Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-01-19 Thread Nick Mathewson
On Thu, Jan 13, 2011 at 12:34 AM, Adrian Chadd wrote: > It's best to assume browsers don't do the right thing in 100% of cases. > > (Been there, done that with Squid..) Ick. Okay, what does Squid (or some other sensible application) assume constitutes a valid URI? (I wonder whether this argues

Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-01-12 Thread Adrian Chadd
It's best to assume browsers don't do the right thing in 100% of cases. (Been there, done that with Squid..) Adrian On Thu, Jan 13, 2011, Trong Long Dinh wrote: > I haven't read RFC 3986. Maybe | _is_ an invalid URI character. But what > happen when i want pass a param contain '|' character. If

Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-01-12 Thread Trong Long Dinh
I haven't read RFC 3986. Maybe | _is_ an invalid URI character. But what happen when i want pass a param contain '|' character. If it's a special character, then firefox have to encode it before send to server. On Thu, Jan 13, 2011 at 11:08 AM, Nick Mathewson wrote: > On Wed, Jan 12, 2011 at 10:5

Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-01-12 Thread Nick Mathewson
On Wed, Jan 12, 2011 at 10:51 PM, Trong Long Dinh wrote: > I already review source code of libevent. Ur small code has same mean with > mine. However, Both are meaningless because function  static char * > end_of_path(char *cp, int allow_qchars) not allow '|' character. If uri > query contain '|'

Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-01-12 Thread Trong Long Dinh
I already review source code of libevent. Ur small code has same mean with mine. However, Both are meaningless because function *static char * end_of_path(char *cp, int allow_qchars)* not allow '|' character. If uri query contain '|' character then it response "bad request". On Thu, Jan 13, 2011

Re: [Libevent-users] bad request with evhttp libevent-2.0.10

2011-01-12 Thread Nick Mathewson
On Wed, Jan 12, 2011 at 6:10 AM, Trong Long Dinh wrote: > Hi all. > I setup a simple httpd like this: > >> #include >> #include >> #include >> >> #include >> #include >> #include >> #include >> >> void now_handler(struct evhttp_request *req, void *arg) { >>     struct evbuffer *buf = evhttp

[Libevent-users] bad request with evhttp libevent-2.0.10

2011-01-12 Thread Trong Long Dinh
Hi all. I setup a simple httpd like this: #include > #include > #include > > #include > #include > #include > #include > > void now_handler(struct evhttp_request *req, void *arg) { > struct evbuffer *buf = evhttp_request_get_output_buffer(req); > evbuffer_add_printf(buf, "{\"now\":%