[Solved] Not able to send data from post query in lighttpd and read from stdin using cat
Added by vaibhov almost 5 years ago
Hello,
I am trying to send some data (raw or binary) using POST to my lighhtpd server using POSTMAN. But i am unable to receive any data at server side. I have tried to see the received data at server using UNIX script through CGI but it appears that there is no data at /dev/stdin. However data packets can be seen in wireshark. I have attached my lighttpd.conf and modules.conf.
lighttpd_ssip.conf (13.4 KB) lighttpd_ssip.conf | |||
modules.conf (3.26 KB) modules.conf |
Replies (4)
RE: Not able to send data from post query in lighttpd and read from stdin using cat - Added by gstrauss almost 5 years ago
I have attached my lighttpd.conf and modules.conf.
but you did not attach the CGI config. Please use lighttpd -p -f /path/to/your/lighttpd_ssip.conf
Are you sure that the CGI is being run?
RE: Not able to send data from post query in lighttpd and read from stdin using cat - Added by vaibhov almost 5 years ago
I have now attached my cgi file, here test is my custom binary in which i am able to print values of varibales eg. $HTTP_ACCEPT_LANGUAGE, "$CONTENT_LENGTH" etc. So the cgi is working fine.
RE: Not able to send data from post query in lighttpd and read from stdin using cat - Added by vaibhov almost 5 years ago
I have attached the logs I get after using command:: lighttpd -p -f /path/to/your/lighttpd_ssip.conf
cmd log lighttpd.txt (32.5 KB) cmd log lighttpd.txt |
RE: Not able to send data from post query in lighttpd and read from stdin using cat - Added by gstrauss almost 5 years ago
I don't think that the test
line in your index.cgi does what you think it does.
Try
#!/bin/sh echo "Status: 200" echo "Content-Type: text/plain" echo echo "Content-Length: $CONTENT_LENGTH"