Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 38049 invoked from network); 30 Jul 2004 09:31:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 30 Jul 2004 09:31:06 -0000 Received: (qmail 84872 invoked by uid 500); 30 Jul 2004 09:30:51 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 84843 invoked by uid 500); 30 Jul 2004 09:30:50 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 84829 invoked by uid 99); 30 Jul 2004 09:30:50 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org From: "Dermot Paikkos" To: Tom Schindl Date: Fri, 30 Jul 2004 10:29:39 +0100 MIME-Version: 1.0 Subject: Re: request appears to be processed twice with PDF::Create Reply-to: dermot@sciencephoto.com CC: modperl@perl.apache.org Message-ID: <410A2313.15448.DFA5C82@localhost> Priority: normal In-reply-to: <41099922.2000903@gmx.at> References: <41093C14.16899.A73E74B@localhost> X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: Quoted-printable Content-description: Mail message body X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Tom, I think I see what your saying. What if you ignored the first and worked on the 2nd? Same problem I guess if you hit the first child. I haven't tried to determine if there are two processes as a result of hitting the form but I know from the logs that the module starts cycling through the form data again. It is probably very sloppy but my problem was that given a username and their file, the file was being opened twice which made parsing a bit tricky. All I want is to open the file once. I am open to more elegant suggestions though :-) Dp. On 30 Jul 2004 at 2:41, Tom Schindl wrote: > Hi, > > Are you sure that's working as you expected? If I got you right I'm > afraid I have to disappoint you but this only works if the second > request is handled by the same apache-child as the first one and > there's another problem. If you come back one day later and hit the > same apache-child which already processed the first request, you won't > get anything. > > Tom > > Dermot Paikkos wrote: > > >Arnaud, > > > >I have found a way around this. I don't know if your interested but > >it goes likes something like this: > > > > foreach my $param ($r->param) { > > if ($param =3D~ /\busers\b/) { > > $users{$r->param($param)} =3D 0; > > } > >....snip...then later > > > > foreach my $key (keys %users) { > > next if ($users{$key} =3D=3D 1; > > $users{$key} =3D 1; > > } > > > >The idea being you only work request that haven't been processed yet. > > Once you process a request you increment that hash key to 1 and can > >avoid using it again. IE still sends the request twice and it is > >working with the first request not the second. > > > >Just a thought. > >Dp. > > > > > > > >On 29 Jul 2004 at 16:20, Arnaud Blancher wrote: > > > > > > > > > >>Dermot Paikkos a =E9crit : > >> > >> > >> > >>>Does this mean you have to go an clean up these files later > >>> > >>> > >>> > >>yes, if you dont want they stay on the disk. > >> > >> > >> > >>>or is > >>>this done when the process ends? > >>> > >>> > >>> > >>maybe you can write a special handle for the directory where you ll > >>write your pdf that delete the pdf when the connection (due to the > >>redirect) will be close by the client (but i'not sure). > >> > >> > >> > >>>I don't want to slow the users down > >>>unless I have to. > >>> > >>>I think I would like to determine the user-agent and work around > >>>the repeating requests....somehow. Do you know how to find out the > >>>user- agent when using Apache::Request? I can't see it when I use > >>>this object. Thanx. Dp. > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >> > >> > >> > > > > > >~~ > >Dermot Paikkos * dermot@sciencephoto.com > >Network Administrator @ Science Photo Library > >Phone: 0207 432 1100 * Fax: 0207 286 8668 > > > > > > > > > > > -- > Report problems: http://perl.apache.org/bugs/ > Mail list info: http://perl.apache.org/maillist/modperl.html > List etiquette: http://perl.apache.org/maillist/email-etiquette.html > > ~~ Dermot Paikkos * dermot@sciencephoto.com Network Administrator @ Science Photo Library Phone: 0207 432 1100 * Fax: 0207 286 8668 -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html