Re: [Libevent-users] evhttp: Abort after receiving a certain number of bytes

2011-02-16 Thread Bas Verhoeven
On 2/16/2011 9:37 AM, Bas Verhoeven wrote: On 2/15/2011 9:38 PM, Nick Mathewson wrote: evhttp_connection_set_max_body_size() sounds like what you're asking for. That looks perfect indeed. Strange that I didn't find it earlier, thanks! I have been doing some testing and it turn

Re: [Libevent-users] evhttp: Abort after receiving a certain number of bytes

2011-02-16 Thread Bas Verhoeven
On 2/15/2011 9:38 PM, Nick Mathewson wrote: On Tue, Feb 15, 2011 at 5:42 AM, Bas Verhoeven wrote: Hi, Is there some way to tell evhttp (in libevent2) to abort a request once it has received more than bytes of data? evhttp_connection_set_max_body_size() sounds like what you're askin

[Libevent-users] evhttp: Abort after receiving a certain number of bytes

2011-02-15 Thread Bas Verhoeven
Hi, Is there some way to tell evhttp (in libevent2) to abort a request once it has received more than bytes of data? I'm writing a small utility with a simple job of fetching a '' from a HTML page and want to make sure my utility does not end up on a site that decides to send it several meg

[Libevent-users] popen() and bufferevents

2010-11-19 Thread Bas Verhoeven
Hi, I am using popen() to execute a program which will run for a few minutes and I want to be notified of any input coming in so I can write all that to a live log window. Just wondering: Is there anything stopping me from using bufferevents for this? Even tho bufferevent seems to be more ge

Re: [Libevent-users] evbuffer_pullup(x,-1): garbage at end?

2010-09-26 Thread Bas Verhoeven
(Sorry if you receive this mail twice, I screwed up earlier). Frank Denis wrote: This is totally expected. evbuffer_pullup() makes the data continuous, but doesn't change anything to the data itself. It's treated as binary data, not as a zero-terminated string. Ah right, that explai

[Libevent-users] evbuffer_pullup(x,-1): garbage at end?

2010-09-24 Thread Bas Verhoeven
Hello again, Another question! I used the code from Pavel to create a basic HTTP client. While testing I noticed that the retrieved data sometimes (but consistent for that specific request) contains garbage at the end: (gdb) p joined $4 = 0x95232ff "\nÿÁÈ[ç\002\030[æ" The client uses 'evbuff

[Libevent-users] evhttp_encode_uri() fails to escape certain characters

2010-09-24 Thread Bas Verhoeven
few of characters that are not being escaped and that should be escaped. Could you take a look at this? I hope this is enough information for now, but if you want me to do more testing/need more information then just let me know.

Re: [Libevent-users] Writing a basic http client

2010-09-24 Thread Bas Verhoeven
Pavel Plesov wrote: Here it is a sample HTTP GET client with redirection (301/302) support. I suppose download.c enough to get the idea how to implement more complex http client. Sorry, I totally missed that e-mail. Should be enough to get me started, thanks! *

[Libevent-users] Writing a basic http client

2010-09-20 Thread Bas Verhoeven
mote host (over http/https) and process the response received. All this while honoring up to redirects, with a timeout of seconds. Is this something I can easily do with evhttp? Is the evhttp (client) code stable enough? Is there some example code on using evh