Project

General

Profile

Poor experience with CGI logging

Added by Secret over 2 years ago

It is now 5am and I have been up overnight.

I have been trying to make lighttpd log CGI output.

I have a simple, test CGI, which is logging to stderr, and I am watching "breakage.log".

If I call the CGI with a GET, it works.

If I call it with a POST, it does not work.

However, access.log has been showing 200 OK for all accesses.

I have - after five hours - finally determined the CGI is not being called when I use POST.

I have then having Googled found out lighttpd always returns 200 OK for a CGI - even if the CGI fails, even if it is not even being called.

This is misleading, because it does not meet with reasonable developer expectation; that the log should not show a 200 OK when the file could not be found. I have not slept tonight because of it.

I think decisions should have conseqeuencs, so I will now be moving on to nginx.


Replies (2)

RE: Poor experience with CGI logging - Added by nitrox over 2 years ago

I´m no expert on this topic, but POST seems way more tricky.

https://www.cs.tut.fi/~jkorpela/forms/cgic.html
http://redmine.lighttpd.net/boards/5/topics/5351

Can not comment any further on this, sorry.

RE: Poor experience with CGI logging - Added by gstrauss over 1 year ago

@Secret: sorry to hear about your experience troubleshooting this. The issue you described was fixed some months ago in the master branch of lighttpd 1.4.x and the fix will be part of the upcoming 1.4.40 release.

    (1-2/2)