On 2021-09-30 15:28, gs-cygwin....@gluelogic.com wrote:
On Thu, Sep 30, 2021 at 10:07:24AM +0000, Andy Romens via Cygwin wrote:
I am running into a bit of what appears a noob issue with lighttpd.
Short and sweet version is I am transitioning from Apache to lighttpd.
Gotten pretty far, except now I am having issues with parsing.
Our website will run a command in a browser like ‘server/cgi-bin/myscript.pl?prod,eventhist’ in the web browser.
With Apache, it will split everything after the ‘?’ As variables,
and return a nicely formatted html result page.
However, after switching to lighttpd, it’s not passing those variables anymore. When I run the script in Cygwin, it works just fine. I’ve been banging my head on this problem for a few days now, so any assistance would be greatly appreciated.

I'd suggest starting at https://wiki.lighttpd.net/#Documentation and
carefully reading through the link for "How to get help".  Then, you
can post your improved questions in the lighttpd Support Forum,
perhaps with more details about your script.
When running CGI scripts such as "myscript.pl", lighttpd creates a
standard CGI environment [1], including environment variables such as
QUERY_STRING, so the problem is likely in your Perl script, and likely
a misunderstanding of standard CGI environment variables.
[1] The Common Gateway Interface (CGI) Version 1.1
https://datatracker.ietf.org/doc/html/rfc3875

There have to be many thousands of perl CGI scripts written in the 17 years since that RFC was posted that you should be able to pick from, preferably with comprehensive client and server metadata debugging output, and use with suitable command line scripts or simple web forms as basic regression tests for your web server functions.

Does the package itself come with any such server test pages and scripts that you can start with, or does the documentation contain such content?

Start with simple client command scripts, web pages, and CGI scripts for each of the simple basic datatypes, each with a single form with a single field of one type, and check how each is handled by your server configuration.

Remember to leave any Apache assumptions at the door, and check how lighttpd handles metadata provided or generated, methods, path info, query strings, parameters, etc. and what assumptions the perl scripts have built in.

Using command line clients' e.g. lynx, wget, curl, and servers' debugging logs, and tools like xtail to merge them into a stream showing the interactions from both sides of the interface, can be a useful approach.

It helps if you can think from the point of view that whichever side you are dealing with currently could be causing an issue.

Hope this helps you think about different approaches you could try.

--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to