Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Stas Bekman
Glenn Strauss wrote: [...] So do you think it's easier to just get this sock_get thing crossplatform and then just use perl modules to manipulate the socket object? Or is it better to expose apr_poll(set)?_.* interface? I prefer the later, as we won't need to deal with crossplatform issues, leav

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Glenn Strauss
On Wed, Aug 18, 2004 at 09:27:57PM -0700, Stas Bekman wrote: > Glenn Strauss wrote: > >The Socket.Handle property is what I think is needed so that > >APR::OS::sock_get() can be made to work on Windows, too. > >mpxs_APR__OS_sock_get() will need to special-case Windows platforms > >and pull the Hand

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Stas Bekman
Glenn Strauss wrote: [...] (On other platforms, like Windows, I don't know what apr_os_sock_t is; check the headers files. :) I'd rather not expose OS specific bits if they won't work with all perl modules. APR provides the API that should (hopefully) work on all platforms, so why not use that?

1.3.2x notes problem

2004-08-18 Thread joseph speigle
high, first the versions: 1.3.27 for apache 1.29 for mod_perl I have a site using like the following SetHandle/ perl-script PerlSetVar Filter On PerlHandler Apache::CookieSupport Apache::GrepSearch Apache::HeaderFooterFilter where

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Glenn Strauss
On Wed, Aug 18, 2004 at 02:51:06PM -0700, Stas Bekman wrote: > Glenn Strauss wrote: > >>>This is what we'd need bound to the Perl API: > >>> > >>>apr_os_sock_t fd; > >>>apr_os_sock_get((apr_os_sock_t *) &fd, (apr_socket_t *) client_socket); > >>> > >>>On Unix-type platforms, apr_os_sock_t is an int

Re: Apache::Session Maint and Test Suite Revamp

2004-08-18 Thread Stas Bekman
Casey West wrote: I had committed to taking over Apache::Session and the original maintainer, Jeffrey Baker, was interested in a patch to prove that I was worthy, or competent, or something. I chose to address the biggest issue in terms of taking over development. Tests. I rewrote the entire test s

Apache::Session Maint and Test Suite Revamp

2004-08-18 Thread Casey West
I had committed to taking over Apache::Session and the original maintainer, Jeffrey Baker, was interested in a patch to prove that I was worthy, or competent, or something. I chose to address the biggest issue in terms of taking over development. Tests. I rewrote the entire test suite using modern

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Stas Bekman
Glenn Strauss wrote: On Wed, Aug 18, 2004 at 12:59:51PM -0700, Ken Simpson wrote: the APR::Socket object is an opaque one, so it can't interoperate with any other perl modules. Have you looked if there is some C api to get the native socket object? There could be one (as they have for file object

Re: mod_perl2 and document_root

2004-08-18 Thread Stas Bekman
Glenn Strauss wrote: [...] I think this is something that Apache 2.1/2 should address. Having server-wide config localized for requests. it'll benefit things like mod_userdir, us and many other modules which may have the need to modify server-wide values for the duration of the request. Agreed.

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread mock
On Wed, Aug 18, 2004 at 02:09:53PM -0700, Stas Bekman wrote: > Glenn Strauss wrote: > >On Wed, Aug 18, 2004 at 12:59:51PM -0700, Ken Simpson wrote: > > > >>>the APR::Socket object is an opaque one, so it can't interoperate with > >>>any other perl modules. Have you looked if there is some C api to

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Stas Bekman
Glenn Strauss wrote: On Wed, Aug 18, 2004 at 02:09:53PM -0700, Stas Bekman wrote: Glenn Strauss wrote: On Wed, Aug 18, 2004 at 12:59:51PM -0700, Ken Simpson wrote: the APR::Socket object is an opaque one, so it can't interoperate with any other perl modules. Have you looked if there is some C api

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Glenn Strauss
On Wed, Aug 18, 2004 at 02:09:53PM -0700, Stas Bekman wrote: > Glenn Strauss wrote: > >On Wed, Aug 18, 2004 at 12:59:51PM -0700, Ken Simpson wrote: > > > >>>the APR::Socket object is an opaque one, so it can't interoperate with > >>>any other perl modules. Have you looked if there is some C api to

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Ken Simpson
> >Right on -- that would give us _everything_ we need. > > but it'll work only on unix, isn't it? Yes -- that's right. It would be a unix-only solution. A more universal solution would be preferred -- i.e. supporting the APR::Poll interface. TTUL Ken -- MailChannels: Control Your Email http:/

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Stas Bekman
Ken Simpson wrote: This is what we'd need bound to the Perl API: apr_os_sock_t fd; apr_os_sock_get((apr_os_sock_t *) &fd, (apr_socket_t *) client_socket); On Unix-type platforms, apr_os_sock_t is an int -- the file descriptor, which you can use with select() or IO::Select() or anything you like in

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Stas Bekman
Glenn Strauss wrote: On Wed, Aug 18, 2004 at 12:59:51PM -0700, Ken Simpson wrote: the APR::Socket object is an opaque one, so it can't interoperate with any other perl modules. Have you looked if there is some C api to get the native socket object? There could be one (as they have for file object

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Ken Simpson
> This is what we'd need bound to the Perl API: > > apr_os_sock_t fd; > apr_os_sock_get((apr_os_sock_t *) &fd, (apr_socket_t *) client_socket); > > On Unix-type platforms, apr_os_sock_t is an int -- the file descriptor, > which you can use with select() or IO::Select() or anything you > like in P

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Glenn Strauss
On Wed, Aug 18, 2004 at 12:59:51PM -0700, Ken Simpson wrote: > > the APR::Socket object is an opaque one, so it can't interoperate with any > > other perl modules. Have you looked if there is some C api to get the > > native socket object? There could be one (as they have for file objects), > >

Re: Post truncation problem

2004-08-18 Thread Kurt Hansen
Stas Bekman wrote: Kurt Hansen wrote: I just figured since he has a threaded perl already that he might want to avoid the thread problems noted on the prereq page, i.e. "Perl 5.8.0's threads.pm doesn't work with mod_perl 2.0." May as well avoid problems that might pop up down the road if you are

Re: mod_perl2 and document_root

2004-08-18 Thread Glenn Strauss
On Wed, Aug 18, 2004 at 12:27:02PM -0700, Stas Bekman wrote: > Glenn Strauss wrote: > >On Wed, Aug 18, 2004 at 10:59:25AM -0700, Stas Bekman wrote: > > > >>Glenn Strauss wrote: > >> > >>>Apache caches the server_rec, so as Stas said, modifying it affects > >>>things globally, and across the request

Re: Post truncation problem

2004-08-18 Thread Stas Bekman
Kurt Hansen wrote: Stas Bekman wrote: Sean T Allen wrote: <>Apache/2.0.40 (Red Hat Linux) Perl/v5.8.0 built for i386-linux-thread-multi mod_perl/1.99_07-dev I believe your problem is there, both in the Perl version and in the mod_perl2 version. You'll want to update Perl to at least 5.8.1 and mo

Re: Post truncation problem

2004-08-18 Thread Kurt Hansen
Stas Bekman wrote: Sean T Allen wrote: <>Apache/2.0.40 (Red Hat Linux) Perl/v5.8.0 built for i386-linux-thread-multi mod_perl/1.99_07-dev I believe your problem is there, both in the Perl version and in the mod_perl2 version. You'll want to update Perl to at least 5.8.1 and mod_perl2 to the most

Re: How to tell if there's data waiting on a NON-blocking Apache connection?

2004-08-18 Thread Ken Simpson
> the APR::Socket object is an opaque one, so it can't interoperate with any > other perl modules. Have you looked if there is some C api to get the > native socket object? There could be one (as they have for file objects), > I didn't check. I looked through apr_network_io.h, which seemed like

Re: Post truncation problem

2004-08-18 Thread Stas Bekman
Kurt Hansen wrote: Hi, Just started working on Apache2/MP2 myself.. I think you lead off your message very well by listing your setup: Sean T Allen wrote: <>Apache/2.0.40 (Red Hat Linux) Perl/v5.8.0 built for i386-linux-thread-multi mod_perl/1.99_07-dev I believe your problem is there, both in the

Re: Post truncation problem

2004-08-18 Thread Kurt Hansen
Hi, Just started working on Apache2/MP2 myself.. I think you lead off your message very well by listing your setup: Sean T Allen wrote: <>Apache/2.0.40 (Red Hat Linux) Perl/v5.8.0 built for i386-linux-thread-multi mod_perl/1.99_07-dev I believe your problem is there, both in the Perl version and in

Re: Post truncation problem

2004-08-18 Thread Stas Bekman
Sean T Allen wrote: <>Apache/2.0.40 (Red Hat Linux) Perl/v5.8.0 built for i386-linux-thread-multi mod_perl/1.99_07-dev Sean, upgrade to 1.99_14 first and try again. -- __ Stas BekmanJAm_pH --> Just Another mod_perl Hack

Re: mod_perl2 and document_root

2004-08-18 Thread Stas Bekman
Glenn Strauss wrote: On Wed, Aug 18, 2004 at 10:59:25AM -0700, Stas Bekman wrote: Glenn Strauss wrote: Apache caches the server_rec, so as Stas said, modifying it affects things globally, and across the request. In C, if I wanted to local'ize the server_rec for the request, I would make a copy of

Post truncation problem

2004-08-18 Thread Sean T Allen
<>Apache/2.0.40 (Red Hat Linux) Perl/v5.8.0 built for i386-linux-thread-multi mod_perl/1.99_07-dev just to get that out of the way. problem i have is that we are running a stripped down version of CGI.pm that on a post does:     my $input =  undef;     my $method    =  $ENV{ 'RE

Re: mod_perl2 and document_root

2004-08-18 Thread Glenn Strauss
On Wed, Aug 18, 2004 at 10:59:25AM -0700, Stas Bekman wrote: > Glenn Strauss wrote: > >Apache caches the server_rec, so as Stas said, modifying it affects > >things globally, and across the request. In C, if I wanted to > >local'ize the server_rec for the request, I would make a copy of the > >ser

Re: Raw header and body of HTTP request

2004-08-18 Thread Joe Schaefer
Joe Schaefer <[EMAIL PROTECTED]> writes: > Be sure you've got > > use Apache::RequestRecIO; ^^^ Sorry, typo- should be Apache::RequestIO. -- Joe Schaefer -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html Li

Re: mod_perl2 and document_root

2004-08-18 Thread Stas Bekman
Glenn Strauss wrote: On Wed, Aug 18, 2004 at 09:36:45AM -0400, Dave Della Costa wrote: Wow, I just got back in the office and I see I sparked quite a discussion! I had suspected that this feature was specific to the first version of mod_perl, alas... A little background: what I have been trying to

Re: mod_perl2 and document_root

2004-08-18 Thread Glenn Strauss
On Wed, Aug 18, 2004 at 09:36:45AM -0400, Dave Della Costa wrote: > Wow, I just got back in the office and I see I sparked quite a discussion! I > had suspected that this feature was specific to the first version of mod_perl, > alas... > > A little background: what I have been trying to do is ess

Re: Raw header and body of HTTP request

2004-08-18 Thread Joe Schaefer
Honza Pazdziora <[EMAIL PROTECTED]> writes: [...] > and it works great. However, I'm probably missing something but how > do you do equivalent of $r->read($buffer, 64_000) multiple times? Be sure you've got use Apache::RequestRecIO; somewhere, and everything should work just fine. If not,

Re: Raw header and body of HTTP request

2004-08-18 Thread Honza Pazdziora
On Wed, Aug 18, 2004 at 09:53:17AM -0400, Geoffrey Young wrote: > > hi honza, a flash from the past :) Past flash stuck here between POSTs, GETs, SOAPs, etc. ;-) > > Is there any way to retrieve the raw content (and headers) of the > > HTTP request in mod_perl2, and have this raw access coexist

Re: Raw header and body of HTTP request

2004-08-18 Thread Geoffrey Young
>>I'm using Apache2, mod_perl2. I use Apache::Request, so that I can get >>to ->args and ->body data easily. > see the httpd-apreq project (aka libapreq, Apache::Request, mod_apreq). eesh, I think I need to read these messages a but more closely next time ;) sorry. --Geoff -- Report problem

Re: Raw header and body of HTTP request

2004-08-18 Thread Joe Schaefer
Honza Pazdziora <[EMAIL PROTECTED]> writes: > I'm using Apache2, mod_perl2. I use Apache::Request, so that I can get > to ->args and ->body data easily. > > At the same time, I would sometimes need to get the raw body data. If the body data is getting lost when you use Apache::Request in mp2, th

Re: Raw header and body of HTTP request

2004-08-18 Thread Geoffrey Young
Honza Pazdziora wrote: > Hello, hi honza, a flash from the past :) > > I'm using Apache2, mod_perl2. I use Apache::Request, so that I can get > to ->args and ->body data easily. > > At the same time, I would sometimes need to get the raw body data. For > example, an application may process bo

Raw header and body of HTTP request

2004-08-18 Thread Honza Pazdziora
Hello, I'm using Apache2, mod_perl2. I use Apache::Request, so that I can get to ->args and ->body data easily. At the same time, I would sometimes need to get the raw body data. For example, an application may process both application/x-www-form-urlencoded and SOAP requests. However, once the d

Re: mod_perl2 and document_root

2004-08-18 Thread Dave Della Costa
Wow, I just got back in the office and I see I sparked quite a discussion! I had suspected that this feature was specific to the first version of mod_perl, alas... A little background: what I have been trying to do is essentially reset document_root for a set of rewrite rules that I want to drop