I'll start with a little update. I've been trying to solve that problem for two days now (spending on it my full time), and I've made some interesting observations:
1) Reading the stdin from a newLISP CGI script works perfectly, as long as a text file is uploaded. It works perfectly in both cases: when using nginx as a proxy, and without any proxy server.
2) Reading the stdin from a newLISP CGI script fails when a binary file is uploaded. After reading a few bytes, the stdin suddenly breakes. Once again: it happens in both cases: with ngxinx proxy, and without it.
I have described this problem
I decided to investigate it more. I've installed the
Code Select
#!/bin/sh
cat > to-file
echo -e "Content-type: text/htmlrnrn"
echo "<p>Hello!</p>"
The result: everything ran fine, just as it should. I was able to upload any file I wanted.
So, I tried to do the same thing using the newLISP HTTP server, and exactly the same two pages (including the simple shell script). The result: all binary files uploaded were broken, just as in the first case I described in this post.
I'm not an HTTP server expert... Therefore I hope that my conclusion is wrong. But the conclusion is that something is wrong with the newLISP HTTP server - since it's the only thing that had been changed before everything stopped to work correctly. And I don't like this conclusion, since I intend to use the newLISP HTTP server a lot.
I tested it all on my Arch Linux box, if it is of any importance.