If 'readb gives you issues too, then that's not it.
Also, is there something like aform-multi that does not use fnids? I need a static upload url.
-----
(mac form-multi (n . body) (w/uniq ga `(tag (form method 'post enctype "multipart/form-data" action ,n) ,@body)))
This is precisely 380 * 1024, which is suspicious.
arc> (= i 0) arc> (w/infile in "x" (whilet c readb.in ++.i)) arc> i 400000
Can you read the file that was POSTed and save it? Ignore parsing out the multipart stuff. Just save what came in through the request.
Here's the test at /upload_is_broken
(mac form-multi (n . body) (w/uniq ga `(tag (form method 'post enctype "multipart/form-data" action ,n) ,@body))) (defop upload_is_broken req (form-multi "upload_static" (gentag input type 'file name 'name) (submit "upload"))) (defop upload_static req (withs (n req!clen f (string "/dev/shm/" (uniq))) (pr "saving multipart data\n") (pr "clen is " n "\n") (w/outfile o f (whilet c (and (> n 0) (readb req!in)) (-- n) ;;(pr "n now is " n) (writeb c o))) (pr "SAVED multipart data. Success!!!\n")))
saving multipart data clen is 1591333 SAVED multipart data. Success!!!
http://tyche.pu-toyama.ac.jp/~a-urasim/lsvl/data/bzip2_1.0.5...
$ md5sum bzip2_1.0.5.orig.tar.gz 3c15a0c8d1d3ee1c46a1634d00617b1a bzip2_1.0.5.orig.tar.gz saving multipart data clen is 841607 SAVED multipart data. Success!!!
server { listen 80; server_name somewebsite.com; access_log /var/log/nginx/somewebsite.com.access.log; location / { proxy_pass http://somewebsite.com:2012; proxy_set_header X-Real-IP $remote_addr; } }
I tried setting the following in /etc/nginx/sites-available/somewebsite.com:
server { # ... various vars as in http://arclanguage.org/item?id=16317 plus the following: client_max_body_size 10m; }
In both cases uploading the bzip2 file hangs.
I also tried setting client_max_body_size in /etc/nginx/nginx.conf but there get a different error:
Restarting nginx: [emerg]: unknown directive "client_max_body_size" in /etc/nginx/nginx.conf:31
Update: Tried setting "client_max_body_size 32m;" under the "http" section in /etc/nginx/nginx.conf but posting still hangs.
Sorry this took so long.