[cups.bugs] [MOD] STR #3221: POST'ing to a custom cgi fails

Opher Shachar ophers at ladpc.co.il
Thu Jun 11 08:11:13 PDT 2009


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Hello,
When posting to a custom cgi - i.e. /usr/share/cups/doc/foo.cgi -
the scheduler does not complete the request and client hangs.
The log file - loglevel debug2 - shows this:

d [11/Jun/2009:16:58:41 +0300] POST /authorization.cgi
d [11/Jun/2009:16:58:41 +0300] CONTENT_TYPE =
application/x-www-form-urlencoded
d [11/Jun/2009:16:58:41 +0300] get_file: 17
filename=/usr/share/doc/cups-1.3.7/he/authorization.cgi size=2862
d [11/Jun/2009:16:58:41 +0300] is_cgi(con=0x2b746e445270,
filename="/usr/share/doc/cups-1.3.7/he/authorization.cgi",
filestats=0x7fff5a006190, type=application/x-httpd-cgi)
d [11/Jun/2009:16:58:41 +0300] is_cgi: Returning 1 with
command="/usr/share/doc/cups-1.3.7/he/authorization.cgi" and
options="(null)"
d [11/Jun/2009:16:58:41 +0300] cupsdReadClient: 17
con->data_encoding=HTTP_ENCODE_LENGTH, con->data_remaining=2862,
con->file=-1

notice that *con->data_remaining* has the size of the cgi file instead of
Content-Length from the POST request.
Looking in the code this happens in the call to get_file() at line 1595 in
scheduler/client.c - function cupsdReadClient().

Regards,
Opher.

Link: http://www.cups.org/str.php?L3221
Version: 1.3-current





More information about the cups mailing list