From MAILER-DAEMON Wed Aug  8 23:38:49 2001
Date: 08 Aug 2001 23:38:49 -0700
From: Mail System Internal Data <yharris@example.net>
Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
X-IMAP: 0997339129 0000000000
Status: RO

This text is part of the internal format of your mail folder, and is not
a real message.  It is created automatically by the mail system software.
If deleted, important folder data will be lost, and it will be re-created
with the data reset to initial values.

From yharris@example.net Mon Apr  2 22:48:52 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 37277 invoked by uid 500); 2 Apr 2001 22:48:50 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 37018 invoked from network); 2 Apr 2001 22:48:47 -0000
Date: Mon, 2 Apr 2001 15:48:51 -0700
From: Jim Winstead <yharris@example.net>
To: yharris@example.net
Subject: prepared 0.32 for release
Message-ID: <yharris@example.net>
Mail-Followup-To: Jim Winstead <yharris@example.net>,
	yharris@example.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.15i
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

sorry for the prolonged silence, but i've bundled up the latest
httpd-apreq into a libapreq-0.32 release.  if a couple of people
could give it a spin and let me know if it looks okay, i'll release
it to the wild.

  http://www.apache.org/~jimw/libapreq-0.32.tar.gz

jim

From yharris@example.net Mon Apr  2 23:32:24 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 91217 invoked by uid 500); 2 Apr 2001 23:32:21 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 91016 invoked from network); 2 Apr 2001 23:32:20 -0000
Date: Mon, 2 Apr 2001 16:32:23 -0700
From: Jim Winstead <yharris@example.net>
To: Rob Bloodgood <yharris@example.net>
Cc: yharris@example.net
Subject: Re: prepared 0.32 for release
Message-ID: <yharris@example.net>
Mail-Followup-To: Jim Winstead <yharris@example.net>,
	Rob Bloodgood <yharris@example.net>, yharris@example.net
References: <yharris@example.net> <yharris@example.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.15i
In-Reply-To: <yharris@example.net>; from yharris@example.net on Mon, Apr 02, 2001 at 04:16:32PM -0700
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

(brought back onto the apreq-dev list.)

yeah, it looks like a newer version of mod_perl is required. but
1.21_02 came out a year ago, so i don't feel too badly about breaking
with older versions. we can always do another release if it turns
out that a lot of people get tripped up by this.

i repackaged with the missing files (i forgot to run
automake).

jim

On Mon, Apr 02, 2001 at 04:16:32PM -0700, Rob Bloodgood wrote:
> Not to rain on your parade, but this package gave me some errors...
> 
> I tried it and got the following warnings:
> 
> # perl Makefile.PL
> ...
> Warning: the following files are missing in your kit:
>         Makefile.in
>         c/Makefile.in
> Please inform the author.
> Writing Makefile for libapreq
> 
> ...
> WARNING from evaluation of /root/work/libapreq-0.32/Request/Makefile.PL:
> Can't locate object method "otherldflags" via package "Apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4src" at (eval
> 73) line 26.
> WARNING from evaluation of /root/work/libapreq-0.32/Cookie/Makefile.PL:
> Can't locate object method "otherldflags" via package "Apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4src" at (eval
> 74) line 26.
> 
> 
> # make
> ...
> make[1]: Entering directory `/root/work/libapreq-0.32/Request'
> make[1]: *** No rule to make target `all'.  Stop.
> 
> alright, do
> # make -k
> 
> make[1]: Entering directory `/root/work/libapreq-0.32/c'
> make[1]: Leaving directory `/root/work/libapreq-0.32/c'
> make[1]: Entering directory `/root/work/libapreq-0.32/Request'
> make[1]: *** No rule to make target `all'.
> make[1]: Leaving directory `/root/work/libapreq-0.32/Request'
> make: *** [subdirs] Error 2
> make[1]: Entering directory `/root/work/libapreq-0.32/Cookie'
> make[1]: *** No rule to make target `all'.
> make[1]: Leaving directory `/root/work/libapreq-0.32/Cookie'
> make: *** [subdirs] Error 2
> make: *** No rule to make target `pure_all', needed by `manifypods'.
> make: Target `makemakerdflt' not remade because of errors.
> 
> Simple logic sez that whatever was missing in Apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4src nuked the other
> targets.
> I'm EXTREMELY open to the idea that my system is just hosed.
> 
> 
> .. Three minutes later ..
> 
> 
> Duh. OK, tried it on a system that has mod_perl 1.25 (not 1.21) on it.
> I still get the warnings abt missing Makefile.in's, but it builds.
> 
> What vv of mod_perl provides
> "otherldflags" via package "Apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4src" ?
> 
> ( just found it in Changes, it's 1.21_02 )
> U should probably put that in Makefile.PL's PREREQ_PM:
> PREREQ_PM => { Apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4src  => 1.21_02,
>              }
> 
> Good luck!
> 
> L8r,
> Rob
> 

From yharris@example.net Tue Apr  3 03:25:33 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 10433 invoked by uid 500); 3 Apr 2001 03:25:30 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 10422 invoked from network); 3 Apr 2001 03:25:29 -0000
Message-ID: <001501c0bbec$93adf0e0$6c3fc8cd@oemcomputer>
From: "Randy Kobes" <yharris@example.net>
To: "Jim Winstead" <yharris@example.net>
Cc: <yharris@example.net>
References: <yharris@example.net>
Subject: Re: prepared 0.32 for release
Date: Mon, 2 Apr 2001 22:17:11 -0500
Organization: University of Winnipeg
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_0012_01C0BBC2.A9B2F0E0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

This is a multi-part message in MIME format.

------=_NextPart_000_0012_01C0BBC2.A9B2F0E0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

----- Original Message ----- 
From: "Jim Winstead" <yharris@example.net>
To: <yharris@example.net>
Sent: Monday, April 02, 2001 5:48 PM
Subject: prepared 0.32 for release


> sorry for the prolonged silence, but i've bundled up the latest
> httpd-apreq into a libapreq-0.32 release.  if a couple of people
> could give it a spin and let me know if it looks okay, i'll release
> it to the wild.
> 
>   http://www.apache.org/~jimw/libapreq-0.32.tar.gz
> 
> jim

Hi,
     On Win32, there was a recent change in Apache
regarding how to access some .h files, making necessary
the attached patch to libapreq-0.32 for the Makefile.PLs. 
With this things build succcessfully on ActivePerl 623,
apache_1.3.19, and mod_perl-1.25.

best regards,
randy kobes


------=_NextPart_000_0012_01C0BBC2.A9B2F0E0
Content-Type: application/octet-stream;
	name="libapreq.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="libapreq.patch"

--- c/Makefile.PL.orig	Tue Jan 09 18:03:42 2001
+++ c/Makefile.PL	Mon Apr 02 22:01:10 2001
@@ -68,7 +68,7 @@
 		'TYPEMAPS' =3D> [ "$ENV{MP_INC}/typemap" ],
 		'VERSION' =3D> $myVERSION,
 		'OBJECT' =3D> "@objs",
-		'INC'  =3D> qq{ -I"$ENV{AP_INC}" -I"$ENV{MP_INC}" },
+                'INC'  =3D> qq{ -I"$ENV{AP_INC}" =
-I"$ENV{AP_INC}/../os/win32" -I"$ENV{MP_INC}" },
   	       );=20
 }
=20
--- Request/Makefile.PL.orig	Tue Jan 09 18:03:42 2001
+++ Request/Makefile.PL	Mon Apr 02 22:00:06 2001
@@ -40,7 +40,7 @@
   WriteMakefile(
 		@mm_args,
 		'TYPEMAPS' =3D> [ "$ENV{MP_INC}/typemap" ],
-		'INC' =3D> qq{ -I../c -I"$ENV{AP_INC}" -I"$ENV{MP_INC}" },
+                'INC' =3D> qq{ -I../c -I"$ENV{AP_INC}" =
-I"$ENV{AP_INC}/../os/win32" -I"$ENV{MP_INC}" },
 		'LIBS' =3D> qq{ -L"$ENV{MP_LIB}" -lmod_perl -L"$ENV{APREQ_LIB}" =
-llibapreq -L"$ENV{AP_LIB}" -lApacheCore },
                 'OBJECT' =3D> 'Request.o',
 	       );
--- Cookie/Makefile.PL.orig	Tue Jan 09 18:03:42 2001
+++ Cookie/Makefile.PL	Mon Apr 02 21:59:34 2001
@@ -40,7 +40,7 @@
   WriteMakefile(
 		@mm_args,
 		'TYPEMAPS' =3D> [ "$ENV{MP_INC}/typemap" ],
-		'INC' =3D> qq{ -I../c -I"$ENV{AP_INC}" -I"$ENV{MP_INC}" },
+                'INC' =3D> qq{ -I../c -I"$ENV{AP_INC}" =
-I"$ENV{AP_INC}/../os/win32" -I"$ENV{MP_INC}" },
 		'LIBS' =3D> qq{ -L"$ENV{MP_LIB}" -lmod_perl -L"$ENV{APREQ_LIB}" =
-llibapreq -L"$ENV{AP_LIB}" -lApacheCore },
 		'OBJECT' =3D> 'Cookie.o',
 	       );
End of Patch.


------=_NextPart_000_0012_01C0BBC2.A9B2F0E0--


From yharris@example.net Tue Apr  3 11:59:32 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 88767 invoked by uid 500); 3 Apr 2001 11:59:30 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 88754 invoked from network); 3 Apr 2001 11:59:29 -0000
Message-ID: <yharris@example.net>
From: Geoffrey Young <yharris@example.net>
To: 'Jim Winstead' <yharris@example.net>, yharris@example.net
Subject: RE: prepared 0.32 for release
Date: Tue, 3 Apr 2001 08:01:45 -0400 
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N


> -----Original Message-----
> From: Jim Winstead [mailto:yharris@example.net]
> Sent: Monday, April 02, 2001 6:49 PM
> To: yharris@example.net
> Subject: prepared 0.32 for release
> 
> 
> sorry for the prolonged silence, but i've bundled up the latest
> httpd-apreq into a libapreq-0.32 release.  if a couple of people
> could give it a spin and let me know if it looks okay, i'll release
> it to the wild.
> 
>   http://www.apache.org/~jimw/libapreq-0.32.tar.gz

just FYI, I get the following from httpd-apreq cvs with bleedperl

cc -c -I../c
-I/src/bleedperl/lib/site_perl/5.7.0/i686-linux-thread-multi/auto/Apache/inc
lude
-I/src/bleedperl/lib/site_perl/5.7.0/i686-linux-thread-multi/auto/Apache/inc
lude/modules/perl
-I/src/bleedperl/lib/site_perl/5.7.0/i686-linux-thread-multi/auto/Apache/inc
lude/include
-I/src/bleedperl/lib/site_perl/5.7.0/i686-linux-thread-multi/auto/Apache/inc
lude/regex
-I/src/bleedperl/lib/site_perl/5.7.0/i686-linux-thread-multi/auto/Apache/inc
lude/os/unix -D_REENTRANT -DDEBUGGING -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g   -DVERSION=\"0.3201\"
-DXS_VERSION=\"0.3201\" -fpic
-I/src/bleedperl/lib/5.7.0/i686-linux-thread-multi/CORE  Request.c
Request.xs: In function `XS_Apache__Upload_fh':
Request.xs:382: warning: assignment from incompatible pointer type

doesn't seem to affect anything though...

perl -V below

--Geoff

> 
> jim
> 

Summary of my perl5 (revision 5.0 version 7 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.14-5.0, archname=i686-linux-thread-multi
    uname='linux spinnaker.laserlink.net 2.2.14-5.0 #1 tue mar 7 21:07:39
est 2000 i686 unknown '
    config_args='-des -Dusethreads -Dprefix=/src/bleedperl -Doptimize=-g
-Dusedevel -Dinstallusrbinperl -Uversiononly'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-g',
    cppflags='-D_REENTRANT -DDEBUGGING -fno-strict-aliasing'
    ccversion='', gccversion='egcs-2.91.734.350.6962/Linux (egcs-1.1.2
release)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -lc -lposix -lcrypt
-lutil
    perllibs=-lnsl -ldl -lm -lpthread -lc -lposix -lcrypt -lutil
    libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
  Locally applied patches:
        DEVEL9506
  Built under linux
  Compiled at Apr  2 2001 22:01:46
  @INC:
    /src/bleedperl/lib/5.7.0/i686-linux-thread-multi
    /src/bleedperl/lib/5.7.0
    /src/bleedperl/lib/site_perl/5.7.0/i686-linux-thread-multi
    /src/bleedperl/lib/site_perl/5.7.0
    /src/bleedperl/lib/site_perl
    .

From yharris@example.net Tue Apr  3 15:21:25 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 18068 invoked by uid 500); 3 Apr 2001 15:21:24 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 18050 invoked from network); 3 Apr 2001 15:21:24 -0000
Date: Tue, 3 Apr 2001 10:36:02 -0500 (CDT)
From: Randy Kobes <yharris@example.net>
To: yharris@example.net
Subject: RE: prepared 0.32 for release
In-Reply-To: <yharris@example.net>
Message-ID: <yharris@example.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

On Tue, 3 Apr 2001, Geoffrey Young wrote:

> 
> just FYI, I get the following from httpd-apreq cvs with bleedperl

[ ... ]

> Request.xs: In function `XS_Apache__Upload_fh':
> Request.xs:382: warning: assignment from incompatible pointer type
> 
> doesn't seem to affect anything though...
> 
> perl -V below
> 
> --Geoff
> 
> Summary of my perl5 (revision 5.0 version 7 subversion 0) configuration:
>   Platform:
>     osname=linux, osvers=2.2.14-5.0, archname=i686-linux-thread-multi
>     uname='linux spinnaker.laserlink.net 2.2.14-5.0 #1 tue mar 7 21:07:39
> est 2000 i686 unknown '

I get the same warning with Win32 ActivePerl 623 (based on 
perl-5.6.0) - it may arise from some multi-thread define.

best regards,
randy kobes


From yharris@example.net Tue Apr  3 16:32:16 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 9021 invoked by uid 500); 3 Apr 2001 16:32:13 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 8961 invoked from network); 3 Apr 2001 16:32:11 -0000
X-Authentication-Warning: mako.covalent.net: dougm owned process doing -bs
Date: Tue, 3 Apr 2001 09:31:33 -0700 (PDT)
From: Doug MacEachern <yharris@example.net>
To: Geoffrey Young <yharris@example.net>
cc: "'Jim Winstead'" <yharris@example.net>, yharris@example.net
Subject: RE: prepared 0.32 for release
In-Reply-To: <yharris@example.net>
Message-ID: <yharris@example.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

On Tue, 3 Apr 2001, Geoffrey Young wrote:

> Request.xs: In function `XS_Apache__Upload_fh':
> Request.xs:382: warning: assignment from incompatible pointer type
> 
> doesn't seem to affect anything though...

you mean not including the core dump it triggers? ;)

if PerlIO is defined, PerlIO_importFILE will be available as a function,
but it was being redefined.  this patch fixes for me..

Index: Request/Request.xs
===================================================================
RCS file: /home/cvs/httpd-apreq/Request/Request.xs,v
retrieving revision 1.12
diff -u -r1.12 Request.xs
--- Request/Request.xs	2001/03/15 03:04:11	1.12
+++ Request/Request.xs	2001/04/03 16:27:09
@@ -87,9 +87,6 @@
 
 #ifdef PerlIO
 typedef PerlIO * InputStream;
-#ifndef PerlIO_importFILE
-#define PerlIO_importFILE(fp,flags) ((FILE *)fp)
-#endif
 #else
 typedef FILE * InputStream;
 #define PerlIO_importFILE(fp,flags) fp


From yharris@example.net Tue Apr  3 17:30:18 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 84842 invoked by uid 500); 3 Apr 2001 17:30:13 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 84826 invoked from network); 3 Apr 2001 17:30:09 -0000
Date: Tue, 3 Apr 2001 12:43:29 -0500 (CDT)
From: Randy Kobes <yharris@example.net>
To: Doug MacEachern <yharris@example.net>
cc: Geoffrey Young <yharris@example.net>,
        "'Jim Winstead'" <yharris@example.net>, yharris@example.net
Subject: RE: prepared 0.32 for release
In-Reply-To: <yharris@example.net>
Message-ID: <yharris@example.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

On Tue, 3 Apr 2001, Doug MacEachern wrote:

> On Tue, 3 Apr 2001, Geoffrey Young wrote:
> 
> > Request.xs: In function `XS_Apache__Upload_fh':
> > Request.xs:382: warning: assignment from incompatible pointer type
> > 
> > doesn't seem to affect anything though...
> 
> you mean not including the core dump it triggers? ;)
> 
> if PerlIO is defined, PerlIO_importFILE will be available as a function,
> but it was being redefined.  this patch fixes for me..
> 
> Index: Request/Request.xs
> ===================================================================
> RCS file: /home/cvs/httpd-apreq/Request/Request.xs,v
> retrieving revision 1.12
> diff -u -r1.12 Request.xs
> --- Request/Request.xs	2001/03/15 03:04:11	1.12
> +++ Request/Request.xs	2001/04/03 16:27:09
> @@ -87,9 +87,6 @@
>  
>  #ifdef PerlIO
>  typedef PerlIO * InputStream;
> -#ifndef PerlIO_importFILE
> -#define PerlIO_importFILE(fp,flags) ((FILE *)fp)
> -#endif
>  #else
>  typedef FILE * InputStream;
>  #define PerlIO_importFILE(fp,flags) fp
> 

I don't have access to my Win32 machine at the moment, but
when I was looking at this before, without the

 #ifndef PerlIO_importFILE
 #define PerlIO_importFILE(fp,flags) ((FILE *)fp)
 #endif

I got an error about PerlIO_importFILE not being found - this 
was with ActivePerl 623, which has the defines for multi-thread.
On a self-compiled Win32 perl without multi-thread, it found
PerlIO_importFILE OK, without the need for this check. 
At the time I thought it related to PERL_IMPLICIT_SYS being defined 
for ActivePerl - if instead of the above check I put at the top 
of Request.xs

#undef PERL_IMPLICIT_SYS

then PerlIO_importFILE was found OK on ActivePerl.

best regards,
randy


From yharris@example.net Tue Apr  3 19:27:24 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 27958 invoked by uid 500); 3 Apr 2001 19:27:18 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 27885 invoked from network); 3 Apr 2001 19:27:13 -0000
Date: Tue, 3 Apr 2001 12:27:13 -0700
From: Jim Winstead <yharris@example.net>
To: yharris@example.net
Subject: Re: prepared 0.32 for release
Message-ID: <yharris@example.net>
Mail-Followup-To: Jim Winstead <yharris@example.net>,
	yharris@example.net
References: <yharris@example.net> <yharris@example.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.15i
In-Reply-To: <yharris@example.net>; from yharris@example.net on Tue, Apr 03, 2001 at 12:43:29PM -0500
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

On Tue, Apr 03, 2001 at 12:43:29PM -0500, Randy Kobes wrote:
> On Tue, 3 Apr 2001, Doug MacEachern wrote:
> > you mean not including the core dump it triggers? ;)
> > 
> > if PerlIO is defined, PerlIO_importFILE will be available as a function,
> > but it was being redefined.  this patch fixes for me..
> > 
> 
> I don't have access to my Win32 machine at the moment, but
> when I was looking at this before, without the
> 
>  #ifndef PerlIO_importFILE
>  #define PerlIO_importFILE(fp,flags) ((FILE *)fp)
>  #endif
> 
> I got an error about PerlIO_importFILE not being found - this 
> was with ActivePerl 623, which has the defines for multi-thread.
> On a self-compiled Win32 perl without multi-thread, it found
> PerlIO_importFILE OK, without the need for this check. 
> At the time I thought it related to PERL_IMPLICIT_SYS being defined 
> for ActivePerl - if instead of the above check I put at the top 
> of Request.xs
> 
> #undef PERL_IMPLICIT_SYS
> 
> then PerlIO_importFILE was found OK on ActivePerl.

so what's the verdict? my system is way too vanilla for this
problem. obviously the define of PerlIO_importFILE is wrong (and
i backed it out). is just undefining PERL_IMPLICIT_SYS going to be
safe, or will there need to be a more esoteric check for activeperl?

jim

From yharris@example.net Tue Apr  3 23:11:23 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 46244 invoked by uid 500); 3 Apr 2001 23:11:23 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 46231 invoked from network); 3 Apr 2001 23:11:22 -0000
Date: Tue, 3 Apr 2001 18:25:05 -0500 (CDT)
From: Randy Kobes <yharris@example.net>
To: Jim Winstead <yharris@example.net>
cc: yharris@example.net
Subject: Re: prepared 0.32 for release
In-Reply-To: <yharris@example.net>
Message-ID: <yharris@example.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

On Tue, 3 Apr 2001, Jim Winstead wrote:

> so what's the verdict? my system is way too vanilla for this
> problem. obviously the define of PerlIO_importFILE is wrong (and
> i backed it out). is just undefining PERL_IMPLICIT_SYS going to be
> safe, or will there need to be a more esoteric check for activeperl?

I wonder if this is a problem just with ActivePerl, or is
it more to do with something related to PERL_IMPLICIT_SYS?
I don't have access to a unix perl with PERL_IMPLICIT_SYS
defined though to check this out ... 

best regards,
randy
 


From yharris@example.net Tue Apr 10 02:22:11 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 49710 invoked by uid 500); 10 Apr 2001 02:22:10 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 49696 invoked from network); 10 Apr 2001 02:22:09 -0000
Date: Mon, 9 Apr 2001 19:22:11 -0700
From: Jim Winstead <yharris@example.net>
To: Randy Kobes <yharris@example.net>
Cc: yharris@example.net
Subject: Re: prepared 0.32 for release
Message-ID: <yharris@example.net>
Mail-Followup-To: Randy Kobes <yharris@example.net>,
	yharris@example.net
References: <yharris@example.net> <yharris@example.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.17i
In-Reply-To: <yharris@example.net>; from yharris@example.net on Tue, Apr 03, 2001 at 06:25:05PM -0500
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

On Tue, Apr 03, 2001 at 06:25:05PM -0500, Randy Kobes wrote:
> On Tue, 3 Apr 2001, Jim Winstead wrote:
> 
> > so what's the verdict? my system is way too vanilla for this
> > problem. obviously the define of PerlIO_importFILE is wrong (and
> > i backed it out). is just undefining PERL_IMPLICIT_SYS going to be
> > safe, or will there need to be a more esoteric check for activeperl?
> 
> I wonder if this is a problem just with ActivePerl, or is
> it more to do with something related to PERL_IMPLICIT_SYS?
> I don't have access to a unix perl with PERL_IMPLICIT_SYS
> defined though to check this out ... 

well, it looks like PerlIO_importFILE just simply may not be
available when PERL_IMPLICIT_SYS is defined. i don't see how
Apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4Uplo888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4fh can be implemented without it, so we may
just need to stub out that function when it is defined.

(the same thing happens when sfio is being used, although at
least then a dummy PerlIO_importFILE function is implemented
that croaks. with a typo in the error message. :)

jim

From yharris@example.net Tue Apr 17 21:52:07 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 13008 invoked by uid 500); 17 Apr 2001 21:52:02 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 12988 invoked from network); 17 Apr 2001 21:51:59 -0000
X-Authentication-Warning: mako.covalent.net: dougm owned process doing -bs
Date: Tue, 17 Apr 2001 14:49:03 -0700 (PDT)
From: Doug MacEachern <yharris@example.net>
To: Jens-Uwe Mager <yharris@example.net>
cc: yharris@example.net, yharris@example.net
Subject: Re: Is hvrv2table supposed to be exported from modperl?
In-Reply-To: <yharris@example.net>
Message-ID: <yharris@example.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

On Wed, 28 Feb 2001, Jens-Uwe Mager wrote:

> The symbol hvrv2table is referenced by the latest libapreq as from CVS
> today but not exported by modperl. Is this a private symbol or just not
> exported by accident? The following patch adds it to the export file of
> modperl so libapreq compiles again under AIX.

thanks, applied.
also applied randy's similar patch for
win32 to src/modules/win32/mod_perl.def
tho i can find the original patch, was that all that was needed randy?


From yharris@example.net Wed Apr 18 01:22:34 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 89212 invoked by uid 500); 18 Apr 2001 01:22:33 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 89200 invoked from network); 18 Apr 2001 01:22:32 -0000
Date: Tue, 17 Apr 2001 20:38:19 -0500 (CDT)
From: Randy Kobes <yharris@example.net>
To: Doug MacEachern <yharris@example.net>
cc: Jens-Uwe Mager <yharris@example.net>, yharris@example.net,
        yharris@example.net
Subject: Re: Is hvrv2table supposed to be exported from modperl?
In-Reply-To: <yharris@example.net>
Message-ID: <{{EMAIL+PHONE}}>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

On Tue, 17 Apr 2001, Doug MacEachern wrote:

> On Wed, 28 Feb 2001, Jens-Uwe Mager wrote:
> 
> > The symbol hvrv2table is referenced by the latest libapreq as from CVS
> > today but not exported by modperl. Is this a private symbol or just not
> > exported by accident? The following patch adds it to the export file of
> > modperl so libapreq compiles again under AIX.
> 
> thanks, applied.
> also applied randy's similar patch for
> win32 to src/modules/win32/mod_perl.def
> tho i can find the original patch, was that all that was needed randy?
> 

yes, for win32 that was all that was needed for libapreq. There
were a couple more needed for AxKit for Win32, but there's a
couple of problems with getting the latest AxKit to run there,
so it'd probably be better to wait to see how those get resolved.

best regards,
randy


From yharris@example.net Thu Apr 19 18:10:20 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 76813 invoked by uid 500); 19 Apr 2001 18:10:16 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 76698 invoked from network); 19 Apr 2001 18:10:11 -0000
Sender: yharris@example.net
To: yharris@example.net
Subject: Perl hook interface, SFIO
From: Joe Schaefer <yharris@example.net>
Date: 19 Apr 2001 14:10:13 -0400
Message-ID: <yharris@example.net>
Lines: 434
User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N


Here's a patch that adds a Perl interface to David's hook code
(I had to drop the "const" declaration from the UploadHook prototype
in apache_request.h).  I've also patched apreq to work using PerlIO 
when perl-5.6.1/mod_perl-1.25 are compiled against SFIO.

To test SFIO support, build apreq with

  % perl MakeFile.PL DEFINE=-DSFIO

Earlier I announced to the modperl mailing list that I had a patch
which required the hook to write the upload data manually.  After
getting some comments and realizing that calling $upload->fh in the hook
would generate *lots* of symbols and file descriptors, I decided to
change this.  apreq will still handle writing the data to fh, and
$upload->fh still returns read-only filehandles.

It doesn't appear to add new leaks on linux, but I don't know what will
happen on other platforms.  Feedback is most appreciated.

Thanks.

-- 
Joe Schaefer

% cvs diff

cvs server: Diffing .
cvs server: Diffing Cookie
cvs server: Diffing Request
Index: Request/Request.pm
===================================================================
RCS file: /home/cvs/httpd-apreq/Request/Request.pm,v
retrieving revision 1.15
diff -u -r1.15 Request.pm
--- Request/Request.pm	2001/04/02 22:44:57	1.15
+++ Request/Request.pm	2001/04/19 17:49:39
@@ -97,6 +97,29 @@
  my $upload = $apr->upload('file');
  $upload->link("/home/user/myfile") || warn "link failed: $!";
 
+=item HOOK_DATA
+
+Extra configuration info to be passed to and upload hook.
+See next item for details.
+
+=item UPLOAD_HOOK
+
+Sets up a callback to run whenever file upload data is read. This
+can be used to provide an upload progress meter during file uploads.
+Apache will automatically continue writing the original data to
+$upload->fh after the hook exits.
+
+ my $transparent_hook = sub {
+   my ($upload, $buf, $len, $hook_data) = @_;
+   warn "$hook_data: got $len bytes for " . $upload->name;
+ };
+
+ my $apr = Apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4Request->new($r, 
+                                HOOK_DATA => "Note",
+                                UPLOAD_HOOK => $transparent_hook,
+                               );
+ $apr->parse;
+
 =back
 
 =head2 instance
Index: Request/Request.xs
===================================================================
RCS file: /home/cvs/httpd-apreq/Request/Request.xs,v
retrieving revision 1.13
diff -u -r1.13 Request.xs
--- Request/Request.xs	2001/04/03 19:21:37	1.13
+++ Request/Request.xs	2001/04/19 17:49:39
@@ -70,13 +70,17 @@
 
 typedef ApacheRequest * Apache__Request;
 typedef ApacheUpload  * Apache__Upload;
+typedef struct { 
+	SV* data;
+	SV* sub; 
+	} Hook;
 
 #define ApacheUpload_fh(upload)       upload->fp
 #define ApacheUpload_size(upload)     upload->size
 #define ApacheUpload_name(upload)     upload->name
 #define ApacheUpload_filename(upload) upload->filename
 #define ApacheUpload_next(upload)     upload->next
-#define ApacheUpload_tempname(upload)   upload->tempname
+#define ApacheUpload_tempname(upload) upload->tempname
 
 #ifndef PerlLIO_dup
 #define PerlLIO_dup(fd)   dup((fd)) 
@@ -90,6 +94,7 @@
 #else
 typedef FILE * InputStream;
 #define PerlIO_importFILE(fp,flags) fp
+#define PerlIO_write(a,b,c)  fwrite((b),1,(c),(a))
 #endif
 
 static char *r_keys[] = { "_r", "r", NULL };
@@ -140,6 +145,52 @@
     return sv; 
 } 
 
+static int upload_hook(void *ptr, char *buf, int len, ApacheUpload *upload)
+{
+    Hook *hook = (Hook*) ptr;
+
+    if ( upload->fp == NULL && ! ApacheRequest_tmpfile(upload->req, upload) )
+	    return -1; /* error */
+
+    {
+    	dTARG;
+    	dSP;
+
+    	PUSHMARK(SP);
+    	EXTEND(SP, 4);
+        ENTER;
+    	SAVETMPS;
+
+    	TARG = sv_newmortal();
+    	sv_setref_pv( TARG, "Apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4Upload", (void*)upload );
+    	PUSHTARG;
+
+    	TARG = sv_2mortal( newSVpvn(buf,len) );
+    	SvTAINT(TARG);
+    	PUSHTARG;
+
+    	TARG = sv_2mortal( newSViv(len) );
+    	SvTAINT(TARG);
+    	PUSHTARG;
+
+    	PUSHs(hook->data);
+
+    	PUTBACK;
+    	perl_call_sv(hook->sub, G_EVAL|G_DISCARD);
+    	FREETMPS;
+    	LEAVE;
+    }
+
+    return SvTRUE(ERRSV) ? -1 : PerlIO_write(upload->fp, buf, len);
+}
+
+static void clear_hook(void *ptr) {
+   Hook *hook = (Hook*) ptr;
+   hook->sub != Nullsv && sv_2mortal(hook->sub);
+   hook->data != Nullsv && sv_2mortal(hook->data);
+}
+
+
 #define upload_push(upload) \
     XPUSHs(sv_2mortal(upload_bless(upload))) 
 
@@ -156,6 +207,7 @@
 		    GvNAME(handle), GvNAMELEN(handle), G_DISCARD);
 }
 
+
 #ifdef CGI_COMPAT
 static void register_uploads (ApacheRequest *req) {
     ApacheUpload *upload;
@@ -189,7 +241,7 @@
     PREINIT:
     int i;
     SV *robj;
-
+	
     CODE:
     class = class; /* -Wall */ 
     robj = ST(1);
@@ -204,6 +256,17 @@
 		RETVAL->disable_uploads = (int)SvIV(ST(i+1));
 		break;
 	    }
+
+	case 'h':
+	   if (strcasecmp(key, "hook_data") == 0) {
+		if (RETVAL->hook_data == NULL) {
+		  RETVAL->hook_data = (void *)ap_pcalloc(r->pool, sizeof(Hook));
+		  ((Hook*)RETVAL->hook_data)->sub = Nullsv;
+ 		}
+		((Hook*)RETVAL->hook_data)->data = newSVsv(ST(i+1));	
+		break;
+	   }
+
 	case 'p':
 	    if (strcasecmp(key, "post_max") == 0) {
 		RETVAL->post_max = (int)SvIV(ST(i+1));
@@ -214,16 +277,31 @@
 		RETVAL->temp_dir = (char *)SvPV(ST(i+1), PL_na);
 		break;
 	    }
+	case 'u':
+	    if (strcasecmp(key, "upload_hook") == 0) {
+		if (RETVAL->hook_data == NULL) {
+		  RETVAL->hook_data = (void *)ap_pcalloc(r->pool, sizeof(Hook));
+	          ((Hook*)RETVAL->hook_data)->data = Nullsv;
+ 		}
+		((Hook*)RETVAL->hook_data)->sub = newSVsv(ST(i+1));
+		RETVAL->upload_hook = &upload_hook;
+		break;
+	    }
 	default:
 	    croak("[libapreq] unknown attribute: `%s'", key);
 	}
     }
 
+
     OUTPUT:
     RETVAL
 
     CLEANUP:
     apreq_add_magic(ST(0), robj, RETVAL);
+    if ( RETVAL->hook_data != NULL ) {
+    	ap_register_cleanup(r->pool, RETVAL->hook_data, 
+			   clear_hook, ap_null_cleanup);    
+    }
 
 char *
 ApacheRequest_script_name(req)
@@ -343,7 +421,8 @@
     ApacheUpload *uptr;
 
     PPCODE:
-    ApacheRequest_parse(req);
+    if ( !req->parsed ) ApacheRequest_parse(req);
+
     if (GIMME == G_SCALAR) {
 	if (name) {
 	    uptr = ApacheUpload_find(req->upload, name);
@@ -376,28 +455,29 @@
     Apach888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4Upload upload
 
     CODE:
-    if (!(RETVAL = PerlIO_importFILE(ApacheUpload_fh(upload),0))) {
-	XSRETURN_UNDEF;
-    }
+    if (  ( RETVAL = ApacheUpload_fh(upload) ) == NULL  )
+	    XSRETURN_UNDEF;
 
     OUTPUT:
     RETVAL
 
     CLEANUP:
-    if (ST(0) != &sv_undef) {
-	IO *io = GvIOn((GV*)SvRV(ST(0))); 
+    if (ST(0) != &PL_sv_undef) {
+	IO *io = GvIOn((GV*)SvRV(ST(0)));
 	int fd = PerlIO_fileno(IoIFP(io));
 	PerlIO *fp;
 
-	fd = PerlLIO_dup(fd); 
+	fd = PerlLIO_dup(fd);
 	if (!(fp = PerlIO_fdopen(fd, "r"))) { 
 	    PerlLIO_close(fd);
 	    croak("fdopen failed!");
-	} 
-	PerlIO_seek(fp, 0, 0); 
-	IoIFP(GvIOn((GV*)SvRV(ST(0)))) = fp;
+	}
+	if (upload->req->parsed)
+	    PerlIO_seek(fp, 0, 0);
+
+	IoIFP(GvIOn((GV*)SvRV(ST(0)))) = fp;  	
 	ap_register_cleanup(upload->req->r->pool, (void*)SvRV(ST(0)), 
-			    apreq_close_handle, ap_null_cleanup);    
+			    apreq_close_handle, ap_null_cleanup);      
     }
 
 long
cvs server: Diffing c
Index: c/apache_request.c
===================================================================
RCS file: /home/cvs/httpd-apreq/c/apache_request.c,v
retrieving revision 1.10
diff -u -r1.10 apache_request.c
--- c/apache_request.c	2001/03/15 15:05:35	1.10
+++ c/apache_request.c	2001/04/19 17:49:40
@@ -268,9 +268,8 @@
 int ApacheRequest___parse(ApacheRequest *req)
 {
     request_rec *r = req->r;
+    int result;
 
-    req->parsed = 1;
-
     if (r->args) {
         split_to_parms(req, r->args);
     }
@@ -278,20 +277,24 @@
     if (r->method_number == M_POST) { 
 	const char *ct = ap_table_get(r->headers_in, "Content-type"); 
 	if (ct && strcaseEQN(ct, DEFAULT_ENCTYPE, DEFAULT_ENCTYPE_LENGTH)) {
-	    return ApacheRequest_parse_urlencoded(req); 
+	    result = ApacheRequest_parse_urlencoded(req); 
 	}
 	else if (ct && strcaseEQN(ct, MULTIPART_ENCTYPE, MULTIPART_ENCTYPE_LENGTH)) {
-	   return ApacheRequest_parse_multipart(req); 
+	   result = ApacheRequest_parse_multipart(req); 
 	}
 	else {
 	    ap_log_rerror(REQ_ERROR, 
 			  "[libapreq] unknown content-type: `%s'", ct); 
-	    return HTTP_INTERNAL_SERVER_ERROR;
+	    result = HTTP_INTERNAL_SERVER_ERROR;
 	}
     } 
     else {
-	return ApacheRequest_parse_urlencoded(req); 
+	result = ApacheRequest_parse_urlencoded(req); 
     }
+
+    req->parsed = 1;
+    return result;
+
 }
 
 int ApacheRequest_parse_urlencoded(ApacheRequest *req)
@@ -319,8 +322,17 @@
 }
 
 static void remove_tmpfile(void *data) {
-    remove((char *) data);
-    free((char *) data);
+    ApacheUpload *upload = (ApacheUpload *) data;
+    ApacheRequest *req = upload->req;
+
+    if( ap_pfclose(req->r->pool, upload->fp) )
+	ap_log_rerror(REQ_ERROR,
+		      "[libapreq] close error on '%s'", upload->tempname);	
+    if( remove(upload->tempname) )
+	ap_log_rerror(REQ_ERROR,
+		      "[libapreq] remove error on '%s'", upload->tempname);
+
+    free(upload->tempname);
 }
 
 FILE *ApacheRequest_tmpfile(ApacheRequest *req, ApacheUpload *upload)
@@ -332,7 +344,8 @@
     int fd, tries = 100;
     
     while (--tries > 0) {
-	if ( (name = tempnam(req->temp_dir, prefix)) == NULL ) continue;
+	if ( (name = tempnam(req->temp_dir, prefix)) == NULL )
+	    continue;
 	fd = ap_popenf(r->pool, name, O_CREAT|O_EXCL|O_RDWR, 0600);
 	if ( fd >= 0 )
 	    break; /* success */
@@ -340,7 +353,7 @@
 	    free(name);
     }
     
-    if ( tries == 0  || (fp = ap_pfdopen(r->pool, fd, "w+") ) == NULL ) {
+    if ( tries == 0  || (fp = ap_pfdopen(r->pool, fd, "wb+") ) == NULL ) {
 	ap_log_rerror(REQ_ERROR,
 		      "[libapreq] could not open temp file '%s'", name); 	
 	if ( fd >= 0 ) { remove(name); free(name); }
@@ -349,7 +362,7 @@
 
     upload->fp = fp;
     upload->tempname = name;
-    ap_register_cleanup(r->pool, (void *)upload->tempname, 
+    ap_register_cleanup(r->pool, (void *)upload, 
 			remove_tmpfile, ap_null_cleanup);
     return fp;
 
@@ -462,11 +475,8 @@
 		upload->size += wlen;
 	    }
 
-	    if (upload->size > 0 && (req->upload_hook == NULL)) {
+	    if (upload->size > 0 && (upload->fp != NULL)) {
 		fseek(upload->fp, 0, 0);
-	    }
-	    else {
-		upload->fp = NULL;
 	    }
 	}
     }
Index: c/apache_request.h
===================================================================
RCS file: /home/cvs/httpd-apreq/c/apache_request.h,v
retrieving revision 1.5
diff -u -r1.5 apache_request.h
--- c/apache_request.h	2001/03/15 03:04:13	1.5
+++ c/apache_request.h	2001/04/19 17:49:40
@@ -10,6 +10,28 @@
 #include "http_protocol.h"
 #include "util_script.h"
 
+#ifdef  SFIO
+#include "sfio.h"
+
+/* sfio 2000 changed _stdopen to _stdfdopen */
+#if SFIO_VERSION >= 20000101L
+#define _stdopen _stdfdopen
+#endif
+
+extern Sfio_t*  _stdopen _ARG_((int, const char*)); /*1999*/
+
+#undef  FILE
+#define FILE 			Sfio_t
+#undef  fwrite
+#define fwrite(p,s,n,f)		sfwrite((f),(p),(s)*(n))
+#undef  fseek
+#define fseek(f,a,b)		sfseek((f),(a),(b))
+#undef  ap_pfdopen
+#define ap_pfdopen(p,q,r) 	_stdopen((q),(r))
+#undef  ap_pfclose
+#define ap_pfclose(p,q)		sfclose(q)
+#endif /*SFIO*/
+
 typedef struct ApacheUpload ApacheUpload;
 
 typedef struct {
@@ -19,7 +41,7 @@
     int parsed;
     int post_max;
     int disable_uploads;
-    int (*upload_hook)(void *ptr, char *buf, int len, const ApacheUpload *upload);
+    int (*upload_hook)(void *ptr, char *buf, int len, ApacheUpload *upload);
     void *hook_data;
     char* temp_dir;
     request_rec *r;
cvs server: Diffing eg
cvs server: Diffing eg/c
cvs server: Diffing eg/c/testapreq
cvs server: Diffing eg/perl
cvs server: Diffing lib
cvs server: Diffing lib/Apache




From yharris@example.net Mon Apr 23 19:14:56 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 88405 invoked by uid 500); 23 Apr 2001 19:14:43 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Delivered-To: moderator for yharris@example.net
Received: (qmail 82717 invoked from network); 23 Apr 2001 12:40:33 -0000
From: "William Rusch" <yharris@example.net>
To: <yharris@example.net>
Subject: libareq make problems
Date: Mon, 23 Apr 2001 08:45:19 -0400
Message-ID: <yharris@example.net>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

Hello I'm trying to compile libareq on an alpha running 4.0d however the
make dies as you can see below. Any help would be greatly appreciated

Thanks
Bill


cc: Error: apache_multipart_buffer.c, line 77: In this statement, "haystack"
may not be subtracted from "ptr".
        len = haystacklen - (ptr - haystack);
-----------------------------^
cc: Error: apache_multipart_buffer.c, line 85: In this statement, "ptr" does
not point to an object type.
        ptr++; len--;
--------^
*** Exit 1
Stop.
*** Exit 1
Stop.



From yharris@example.net Mon Apr 23 20:34:27 2001 -0700
Status: 
X-Status: 
X-Keywords:
Return-Path: <apreqyharris@example.net>
Delivered-To: yharris@example.net
Received: (qmail 12654 invoked by uid 500); 23 Apr 2001 20:34:23 -0000
Mailing-List: contact yharris@example.net; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Post: <mailto:yharris@example.net>
List-Help: <mailto:yharris@example.net>
List-Unsubscribe: <mailto:yharris@example.net>
List-Subscribe: <mailto:yharris@example.net>
Delivered-To: mailing list yharris@example.net
Received: (qmail 12452 invoked from network); 23 Apr 2001 20:34:20 -0000
Sender: yharris@example.net
To: "William Rusch" <yharris@example.net>
Cc: <yharris@example.net>
Subject: Re: libareq make problems
References: <yharris@example.net>
From: Joe Schaefer <yharris@example.net>
Date: 23 Apr 2001 16:34:27 -0400
In-Reply-To: "William Rusch"'s message of "Mon, 23 Apr 2001 08:45:19 -0400"
Message-ID: <yharris@example.net>
Lines: 32
User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

"William Rusch" <yharris@example.net> writes:

> Hello I'm trying to compile libareq on an alpha running 4.0d however the
> make dies as you can see below. Any help would be greatly appreciated
> 

Please try out the latest version from 

  http://www.apache.org/~jimw/

> cc: Error: apache_multipart_buffer.c, line 77: In this statement, "haystack"
> may not be subtracted from "ptr".
>         len = haystacklen - (ptr - haystack);
> -----------------------------^
> cc: Error: apache_multipart_buffer.c, line 85: In this statement, "ptr" does
> not point to an object type.
>         ptr++; len--;
> --------^

The latest CVS versions don't have the lines above. It looks like

  line 72:      char *ptr = haystack;
  line 77:	len = haystacklen - (ptr - (char *)haystack);


Please report back if you experience problems with the latest
version.  

Thanks.
-- 
Joe Schaefer



{'source': 'Apache Software Foundation Public Mail Archives'}