http {
include mime.types;
default_type application/octet-stream;
upstream hoge_app {
server 127.0.0.1:5000;
}
server {
listen 443;
server_name localhost;
ssl on;
ssl_certificate server.crt;
ssl_certificate_key server.key;
location / {
proxy_pass http://hoge_app;
}
}
}みたいな適当なHTTPSサーバーを用意して、裏側である程度の長さのコンテンツを返す分には問題無いのだけど、
$ plackup -p 5000 -e 'sub { [200, [], ["a"x10116]] }'$ perl -MFurl -E '$res = Furl->new->get("https://localhost/"); say($res->is_success or $res->status_line)'
1この数字より1バイト多く返すとエラーになってしまう。
$ plackup -p 5000 -e 'sub { [200, [], ["a"x10117]] }'$ perl -MFurl -E '$res = Furl->new->get("https://localhost/"); say($res->is_success or $res->status_line)'
500 Internal Response: Cannot read content body: timeout at -e line 1
bufsizeを大きくすればエラーが出なくなるのだけど、再現条件がよく分からない…