Return-Path: Delivered-To: apmail-httpd-apreq-dev-archive@www.apache.org Received: (qmail 88859 invoked from network); 12 Sep 2006 20:14:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Sep 2006 20:14:30 -0000 Received: (qmail 37855 invoked by uid 500); 12 Sep 2006 20:14:29 -0000 Delivered-To: apmail-httpd-apreq-dev-archive@httpd.apache.org Received: (qmail 37828 invoked by uid 500); 12 Sep 2006 20:14:29 -0000 Mailing-List: contact apreq-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list apreq-dev@httpd.apache.org Received: (qmail 37817 invoked by uid 99); 12 Sep 2006 20:14:29 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Sep 2006 13:14:29 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=margol@beamartyr.net; spf=permerror X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received-SPF: error (idunn.apache.osuosl.org: domain beamartyr.net from 199.203.54.245 cause and error) Received: from ([199.203.54.245:45559] helo=vl654.host245.netvision.net.il) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 3C/24-04378-C2517054 for ; Tue, 12 Sep 2006 13:14:38 -0700 Received: from [192.168.2.80] (bzq-88-153-189-67.red.bezeqint.net [88.153.189.67]) (authenticated bits=0) by mail1.mirimar.net (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k8CKECEj000829 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Sep 2006 23:14:13 +0300 Message-ID: <45071518.7030504@beamartyr.net> Date: Tue, 12 Sep 2006 23:14:16 +0300 From: Issac Goldstand Organization: Mirimar Networks User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Brian McQueen CC: apreq-dev@httpd.apache.org Subject: Re: how to get the temp file name References: <5b3fa8f0609121223g1ce6e993tfd5c33156bd9d9f6@mail.gmail.com> In-Reply-To: <5b3fa8f0609121223g1ce6e993tfd5c33156bd9d9f6@mail.gmail.com> X-Enigmail-Version: 0.94.0.0 OpenPGP: url=http://www.beamartyr.net/pubkey.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/1872/Tue Sep 12 21:39:55 2006 on hector.mirimar.net X-Virus-Status: Clean X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Well, the spool file is just a normal apr_file_t, and the actual file handle is accessable via apreq_brigade_spoolfile(), so you'll likely want to do something like: (untested) char[255] filename; apr_status_t rv; rv = apr_file_name_get(&filename, apreq_brigade_spoolfile(param->upload)); Issac Brian McQueen wrote: > I am trying to figure out how to get the name of the temp file created > by apreq when it spools to the disk. I have been through several > tries now and the most promising seems to be making a hook and adding > it to the parser. The hook would get the name from the brigade as the > request is parsed, then it could put the name into a note which my > module could get later. I'm struggling now to add my hook to the > parser. I have a parser function, but not a parser_t at that stage of > my code - prior to reading and parsing - and the add_hook function > requires a parser_t. At this stage the parser is not yet set. > > How can I directly add a hook to the parse_multipart parser? > Do any of you have any better ideas? > > Brian McQueen