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

Re: [Libevent-users] [PATCH] Add sample/https-client.c, an example of stacking evhttp as a client on top of bufferevent_ssl.



On Mon, Mar 11, 2013 at 11:22 PM, Azat Khuzhin <dohardgopro@xxxxxxxxx> wrote:
> With my libevent version 512KiB transmitted succesfully.
>
> azat:.../libevent/sample (https)$ tr -dc A-Za-z0-9 </dev/urandom |
> head -c$((512 * 1024) >| ../../data.512.kb
> azat:.../libevent/sample (https)$ ./https-client -url
> https://127.0.0.1/proxy -data ../../data.512.kb -ignore-cert
> Response line: 200 OK
> OK
>
> But 4MiB:
> azat:.../libevent/sample (https)$ tr -dc A-Za-z0-9 </dev/urandom |
> head -c$((4096 * 1024)) >| ../../data.4.mb
> azat:.../libevent/sample (https)$ ./https-client -url
> https://127.0.0.1/proxy -data ../../data.4.mb -ignore-cert
> some request failed - no idea which one though!
> socket error = Resource temporarily unavailable (11)
>
> Why version libevent do you have?

*what

>
> On Mon, Mar 11, 2013 at 7:42 PM, Alexey Ozeritsky <aozeritsky@xxxxxxxxx> wrote:
>>
>>
>> 11.03.2013, 19:31, "Oscar Koeroo" <okoeroo@xxxxxxxxx>:
>>> On 11-03-13 16:00, Alexey Ozeritsky wrote:
>>>
>>>>  libevent does something wrong:
>>>>
>>>>  $ ./sample/https-client -url https://localhost/proxy -data 4K -ignore-cert
>>>>  Response line: 200 OK
>>>>  OK
>>>>
>>>>  $ ./sample/https-client -url https://localhost/proxy -data 512K -ignore-cert
>>>>  Response line: 502 Bad Gateway
>>>>  <html>
>>>>  <head><title>502 Bad Gateway</title></head>
>>>>  <body bgcolor="white">
>>>>  <center><h1>502 Bad Gateway</h1></center>
>>>>  <hr><center>nginx/1.2.1</center>
>>>>  </body>
>>>>  </html>
>>>
>>> Perhaps silly, but can you test again by adding a slash to the URL
>>> provided?
>>>
>>> i.e.: "https://localhost/proxy/"; instead of "https://localhost/proxy";
>>>
>>> Curl might add the missing slash making an exact match on the URL to
>>> succeed there.
>>
>> the same
>>
>> 4K -- ok
>> 512K -- 502 Bad Gateway
>> 10M -- Resource temporarily unavailable (11)
>>
>> python backend log:
>> ...
>> localhost - - [11/Mar/2013 19:38:15] "POST /proxy/ HTTP/1.0" 200 -
>> localhost - - [11/Mar/2013 19:38:17] "POST /proxy/ HTTP/1.0" 200 -
>> localhost - - [11/Mar/2013 19:38:22] "POST /proxy/ HTTP/1.0" 200 -
>> ...
>>
>> nginx error.log:
>> ..
>> 2013/03/11 19:38:22 [error] 24256#0: *120 sendfile() failed (32: Broken pipe) while sending request to upstream, client: ::ffff:127.0.0.1, server: localhost, request: "POST /proxy/ HTTP/1.1", upstream: "http://127.0.0.1:8000/proxy/";, host: "localhost"
>> ..
>> nginx access.log:
>> ::ffff:127.0.0.1 - - [11/Mar/2013:19:38:15 +0400] "POST /proxy/ HTTP/1.1" 200 13 "-" "-"
>> ::ffff:127.0.0.1 - - [11/Mar/2013:19:38:22 +0400] "POST /proxy/ HTTP/1.1" 502 172 "-" "-"
>> ::ffff:127.0.0.1 - - [11/Mar/2013:19:39:16 +0400] "POST /proxy/ HTTP/1.1" 400 0 "-" "-"
>>
>>
>>>
>>>         Oscar
>> ***********************************************************************
>> To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
>> unsubscribe libevent-users    in the body.
>
>
>
> --
> Respectfully
> Azat Khuzhin
> Primary email a3at.mail@xxxxxxxxx



-- 
Respectfully
Azat Khuzhin
Primary email a3at.mail@xxxxxxxxx
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.