Return-Path: Delivered-To: apache-bugdb-archive@hyperreal.org Received: (qmail 19138 invoked by uid 6000); 25 Nov 1997 01:30:06 -0000 Received: (qmail 19093 invoked by uid 2001); 25 Nov 1997 01:30:00 -0000 Received: (qmail 16617 invoked by uid 2012); 25 Nov 1997 01:21:59 -0000 Message-Id: <19971125012159.16616.qmail@hyperreal.org> Date: 25 Nov 1997 01:21:59 -0000 From: Bill Kelley Reply-To: kelley@windtraveller.com To: apbugs@hyperreal.org X-Send-Pr-Version: 3.2 Subject: general/1477: Multipart form posting always fails Sender: apache-bugdb-owner@apache.org Precedence: bulk >Number: 1477 >Category: general >Synopsis: Multipart form posting always fails >Confidential: no >Severity: critical >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Nov 24 17:30:00 PST 1997 >Last-Modified: >Originator: kelley@windtraveller.com >Organization: apache >Release: 1.3b2 >Environment: On Windows NT >Description: Multipart form postin fails, apparently due to Apache pipes being opened in TEXT mode instead of ... #ifdef WIN32 #define enc_pipe(fds) _pipe(fds, 512, O_BINARY | O_NOINHERIT) #else ^^^^^^^^^^ was O_TEXT which in turn adds a before each , which since in multipart form postin, one of the delimiters sent by the browser (Netscape 3) for multipart forms is a back to back , which gets transmogrified (technical term :-) into causing the CGI form parser not to find its delimiter. There may have been some good reason for using O_TEXT, which causes something someplace else to work, and if so, I'd REALLY appreciatte feedback to that effect. I'm using Apache on NT, and find it very fragile. I have frequent hangs, apparently about a 24k memory leak per request, and often leak about 2 file/pipe/whatever "handles" per request. We worked around the resource "leaks" by asking apache to suicide every 10 requests, which seems absurdly soon. Otherwise we run out of file handles at some point. Anyway, here is my attempt to fix an NT bug, and anyone with suggestions on how to fix others would be very welcome to hear from. >How-To-Repeat: Send multipart form to apache on NT, the cgi script will not find the separator. >Fix: See descriptio >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ]