Bug 241365

Summary: kio_cgi does not set $SCRIPT_NAME
Product: [Unmaintained] kio Reporter: Christopher Yeleighton <giecrilj>
Component: cgiAssignee: Cornelius Schumacher <schumacher>
Status: RESOLVED UNMAINTAINED    
Severity: normal    
Priority: NOR    
Version First Reported In: 4.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Christopher Yeleighton 2010-06-11 02:30:06 UTC
Version:           4.3 (using KDE 4.3.5) 
OS:                Linux

kio_cgi is expected to be a CGI implementation.  Setting $SCRIPT_NAME is mandatory, per RFC_3875.  Additionally, SERVER_PROTOCOL is set to HTTP, which is bogus; it should be CGI.

Reproducible: Always

Steps to Reproduce:
Execute the following script named test via kio_cgi:

#!/usr/bin/env bash

 # The HTTP header followed by an empty line:
 echo 'Content-Type: text/plain
'

 # The content:
echo ${SERVER_PORT-'Error: SERVER_PORT not set (4.1.15.)'}
echo ${SCRIPT_NAME-'Error: SCRIPT_NAME not set (4.1.13.)'}


Actual Results:  
Error: SERVER_PORT not set (4.1.15.)
Error: SCRIPT_NAME not set (4.1.13.)
HTTP


Expected Results:  

/test
CGI
Comment 1 Christopher Yeleighton 2011-03-05 22:52:18 UTC
Workaround: ${SCRIPT_NAME-$0}.
Comment 2 Julian Steinmann 2018-06-24 14:10:38 UTC
There is no longer a CGI slave included in KIO, so all bugs related to this slave are now obsolete. Thanks for reporting this bug!