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] Does bufferevent_openssl_socket_new() API support multi-thread?

2011-01-12 Thread Nick Mathewson
2011/1/9 林宇舜 Yu-Shun Lin : > Hi all. > Does bufferevent_openssl_socket_new() API support multi-thread? > I refer the sample of regress_ssl.c in the libevent source package, and > write an SSL server with multi-thread. > But it is deadlock after receive the first message from client. Yuck. This is

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] zero window is not invoking read event

2011-01-12 Thread Arun K. Lankalapall
Hi, I used libevent library to implement proxy. I created a read event and registered a read_callbk when the socket is ready to read. event_set(&c->event_read, sfd, EV_READ | EV_PERSIST, tcp_read_cb, (void *)c); event_base_set(base,&c->event_read); if (event_add(&c->

[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\":%