Skip to content

Instantly share code, notes, and snippets.

View vinoski's full-sized avatar

Steve Vinoski vinoski

View GitHub Profile
@vinoski
vinoski / ssl_accept_bug.erl
Created November 28, 2012 18:22
Erlang R15B03 SSL accept timeout bug example
-module(ssl_accept_bug).
-export([start/0]).
-define(PORT, 9999).
start() ->
ssl:start(),
%% You can get the Yaws cert and key files here:
%% https://github.com/klacke/yaws/blob/master/ssl/yaws-cert.pem
%% https://github.com/klacke/yaws/blob/master/ssl/yaws-key.pem
@vinoski
vinoski / gist:1525225
Created December 27, 2011 21:31
yaws issue #75 server output
$ yaws -i
Erlang R14B04 (erts-5.8.5) [source] [smp:8:8] [rq:8] [async-threads:0] [kernel-poll:true]
Eshell V5.8.5 (abort with ^G)
1>
=INFO REPORT==== 27-Dec-2011::16:19:08 ===
Yaws: Using config file /usr/local/etc/yaws/yaws.conf
yaws:Add path "/usr/local/var/yaws/ebin"
yaws:Add path "/usr/local/lib/yaws/examples/ebin"
yaws:Running with id="default" (localinstall=false)
@vinoski
vinoski / gist:1525210
Created December 27, 2011 21:26
yaws issue #75 client output
$ dd if=/dev/zero of=/tmp/bigfile bs=1m count=2048
2048+0 records in
2048+0 records out
2147483648 bytes transferred in 21.450200 secs (100114855 bytes/sec)
$ curl -v -F 'file=@/tmp/bigfile' http://localhost:8000/tmp/upload.yaws
* About to connect() to localhost port 8000 (#0)
* Trying ::1... Connection refused
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8000 (#0)
> POST /tmp/upload.yaws HTTP/1.1