X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B0DE23858C2C
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
 header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
 spf=none smtp.mailfrom=systematicsw.ab.ca
X-Authority-Analysis: v=2.4 cv=I4EG+Psg c=1 sm=1 tr=0 ts=61565ac6
 a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17
 a=IkcTkHD0fZMA:10 a=Rh1ySqpaAAAA:8 a=Y8zkqK7kAAAA:8 a=48vgC7mUAAAA:8
 a=TImcKGuyeGIbufSLrCcA:9 a=QEXdDO2ut3YA:10 a=49NKa3T3cLSxV3hCL32J:22
 a=PMfRXvGH5xpD9em-gAiF:22 a=w1C3t2QeGrPiZgrLijVG:22
To: cygwin@cygwin.com
References: <CH0PR14MB493056E9F7B26A4F7DBA6FC0FBAA9@CH0PR14MB4930.namprd14.prod.outlook.com>
 <YVYr5uUK11RHniT/@xps13>
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
Organization: Systematic Software
Subject: Re: Lighttpd and Perl
Message-ID: <b26e9e1b-7ad0-3872-9131-9f5f1df08705@SystematicSw.ab.ca>
Date: Thu, 30 Sep 2021 18:48:05 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
 Thunderbird/78.14.0
MIME-Version: 1.0
In-Reply-To: <YVYr5uUK11RHniT/@xps13>
Content-Language: en-CA
X-CMAE-Envelope: MS4xfDODLGYGV5V3Q93uhPnszDJM+rrLHwynAWMIHbAHAKU3yYuhKTIX8pR742jGOTUfzJ8e39Q3oP2PeblfuI4GbWWVEf0vz151cOXUG4NykDh/qK8g2Toj
 s9zqsjTIvbQvatxB0J6rL7Fq9UbRPkxBDfE0K6+o5l7k1eJA1gm1M9924fLigDQpWCTDSJzofC9z/ycdgjj0nYbeV3YryZ4A00s=
X-Spam-Status: No, score=-1161.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
 KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL,
 RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,
 SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Reply-To: cygwin@cygwin.com
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 1910mPU3019092

On 2021-09-30 15:28, gs-cygwin.com@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

