CORE-POS / IS4C

Cooperative Operational Retail Environment
http://www.core-pos.com
GNU General Public License v2.0
63 stars 44 forks source link

Add fallback for `SCRIPT_FILENAME`, in `AjaxCallback` on FastCGI #1154

Closed lgedgar closed 2 years ago

lgedgar commented 2 years ago

There seems to be a problem with the AjaxCallback mechanism when FastCGI is in use?

In practice what we saw was, when logged into the POS lane as cashier, entering "anything" into the main input box, it was ignored and nothing would happen. The front-end was submitting entry to the web server, but the response was totally empty.

Finally figured out that the server wasn't able to determine the SCRIPT_FILENAME value using current code. After some searching I found this which mentioned FastCGI, and then I confirmed that we are using FastCGI for the install where this bug was seen.

So this commit "fixes" for the install in question, but I'm not sure what the implications are of merging it..? Seems safe enough to me but you may have better ideas.