Subject: pkg/17251: bug in thttpd pkgsrc version
To: None <gnats-bugs@gnats.netbsd.org>
From: None <olt@bogosoft.com>
List: netbsd-bugs
Date: 06/13/2002 22:14:38
>Number:         17251
>Category:       pkg
>Synopsis:       bug in POST handling in thttpd 2.21b
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 13 13:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Tonnhofer
>Release:        NetBSD 1.5ZC
>Organization:
	
>Environment:
	
	
System: NetBSD fud 1.5ZC NetBSD 1.5ZC (MYKERNEL) #0: Tue Apr 2 18:41:25 CEST 2002 olt@fud:/usr/src/sys/arch/i386/compile/MYKERNEL i386
Architecture: i386
Machine: i386
>Description:
There are troubles with CGI scripts and POST requests.
>How-To-Repeat:
My CGI script:
-----
#!/usr/bin/awk -f

BEGIN {

    print "Content-type: text/plain\n"

    if (ENVIRON["REQUEST_METHOD"] == "POST") {
        if (ENVIRON["CONTENT_TYPE"] == "application/x-www-form-urlencoded") {
            cmd = "dd bs=1 count=" ENVIRON["CONTENT_LENGTH"] 
            cmd | getline input
            close (cmd)
        }
    }

    print "Post data was : " input
}
-----

When sending a request for this script, the contection stalled.

>Fix:
Update pkgsrc to other version, current 2.20c and development 2.23beta1
are working. ---- http://www.acme.com/software/thttpd/
>Release-Note:
>Audit-Trail:
>Unformatted: