Re: submit-data and chained handlers

2001-12-16 Thread Gerald Menzel

  e.g. $r-read($in,$r-header_in('Content-length'));
  or   $in=$r-content();
  give's my handler the data, but unfotunately exclusive - so the data
don't
  reaches Apache::Registry and the cgi-script.
 
  Any suggests?

 Apache::RequestNotes.
 - Perrin


No, Apache::RequestNotes doesn't solve my problem. Please look at this:

Files *.pl
SetHandler perl-script
PerlHandler Apache::qwerty Apache::ChainBuffer Apache::Registry
Options +ExecCGI
PerlSendHeader On
/Files

Apache::Registry processes ordinary cgi-scripts, Apache::ChainBuffer buffers
the generated content and Apache::qwerty have to parse and/or modify the
whole content. All this works fine.
But Apache::qwerty also have to get at the data submitted by the browser in
POST/PUT requests. The Eagle Book discribes how to use the $r-read() or
$r-content() function to read the data from STDIN, but using one of this
functions befor the Apache::Registry handler is involved clears the data
buffer and the cgi-scripts don't run correctly. If I use one of this
functions after Apache::Registry is called, the data buffer is allready
cleared and so Apache::qwerty can't get at the data.
Apache::RequestNotes don't work because Apache::Registry expect to read the
POST/PUT-data from STDIN.

It's important that the cgi-scripts run unmodified and without any notice of
their unnaturally environment.


bb, Gerald Menzel.




Re: load balancing on apache by IP CHAINING

2001-12-16 Thread David Young

Servlet chaining is what the Java web server will do, and it has nothing to
do with load balancing (that I can think of).

ipchains is the command to enable firewall/packet filter/packet masquerading
capability in linux. I would suppose that it can be used to round-robin
requests or something, but I don't know how to set that up.

 From: Medi Montaseri [EMAIL PROTECTED]
 Date: Sat, 15 Dec 2001 20:57:19 -0800 (PST)
 To: Anand R [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: Re: load balancing on apache by IP CHAINING
 
 
 I'm confused'IP chainging' as the name says is at the IP (or Network)
 layer, what does that have to do with Apache or any HTTP server at the
 application level.
 
 I think any such IP based load balancing technologies are inherently
 unaware of the total system issues and are simply making a jugdment based
 on the IP level or perhaps a specific protocol on top of IP to route the
 next packet (or next session). Having said that a Perl HTTP would/could
 benefit from it just as well...
 
 On Sat, 15 Dec 2001, Anand R wrote:
 
 IP chaining can be done in Java Webserver,
 How to do it in Apache Webserver.
 
 Please let the Ring know this,
 Thanks in advance,
 Regards,
 Anand 
 - Original Message -
 From: Derek Jones
 To: Hemant Singh ; [EMAIL PROTECTED]
 Cc: Derek G Jones
 Sent: Friday, December 14, 2001 7:29 PM
 Subject: RE: load balancing on apache
 
 
 
 Hi all,
 
 You can do load balancing using ipchains as well.
 
 Can't remember the program name offhand, but if I have time
 I'll look it up and let the list know.
 
 Only works if your servers are Linux of course.
 
 Kind regards
 
 Derek.
 --
 Derek Jones  1051, Bollinger Road,
 Tel:717 359 8817  Littlestown,
 Mobile: 717 977 4556PA, 17340, USA
 Email: [EMAIL PROTECTED]
 AIM:   scunacc 
 
 
 
 -- 
 -
 Medi Montaseri   [EMAIL PROTECTED]
 Unix Distributed Systems EngineerHTTP://www.CyberShell.com
 CyberShell Engineering
 -
 
 




Form Submit Question and Apache::Request

2001-12-16 Thread El Capitan

I have a form to send to a content handler and wish to use the HTML tag:

SELECT name=multi_list multiple size=4
OPTION value=1One/OPTION
OPTION value=2Two/OPTION
OPTION value=3Three/OPTION
OPTION value=4Four/OPTION
OPTION value=5Five/OPTION
OPTION value=6Six/OPTION
/SELECT

I have a handler like:

###
package testform;

use Apache::Requst;

sub handler() {
my $r = Apache::Request-new(shift);
my @list = $r-param('multi_list') || undef;

# process the list
for (@list) {
# do stuff with each selected form value
...
}
...
...
}
###


For whatever reason, I dont see the multiple values that ware selected on
the form.  Any reason why I cant collect multiple values from a form using
Apache::Request?


K




Re: submit-data and chained handlers

2001-12-16 Thread Perrin Harkins

 Apache::RequestNotes don't work because Apache::Registry expect to
read the
 POST/PUT-data from STDIN.

 It's important that the cgi-scripts run unmodified and without any
notice of
 their unnaturally environment.

I don't think there's any way around the fact that you can only read the
content once.  That means you need to read and store it for other
handlers to use, which is what Apache::RequestNotes does.
Alternatively, you could add something to your Registry script that
stuffs the parsed values into pnotes yourself after using them.  If you
put that inside a block that checks for $ENV{'MOD_PERL'}, you'll still
be able to run the script safely under standard CGI.

It also looks like you're re-inventing Apache::Filter or
Apache::OutputChain.  Have you tried them?

- Perrin






Re: RFC: CGI vs. Apache Namespace Question

2001-12-16 Thread Thomas Klausner

Hi!

On Wed, Dec 12, 2001 at 01:44:52PM -0500, darren chamberlain wrote:
 I didn't even think of that; if Apache is not installed, having
 URI2Param.pm in site_perl/Apache doesn't matter.  Therefore, I
 would like to resubmit option 5:
 
   5)  Include Apache::URI2Param with the CGI::URI2Param module
   that gets installed along with CGI::URI2Param, where
   Apache::URI2Param calls CGI::URI2Param::uri2param.

A great idea, I'll make it so!

Thanks 

BTW, sorry for the long delay, but the combination of arctic temperatures
(-15 deg. Celsius) in Vienna and me still riding my bike resulted in some
sort of flu. But now I am well again ...

-- 
 D_OMM  +  http://domm.zsi.at -+
 O_xyderkes |   neu:  Arbeitsplatz   |   
 M_echanen  | http://domm.zsi.at/d/d162.html |
 M_asteuei  ++





Re: Form Submit Question and Apache::Request

2001-12-16 Thread Joe Schaefer

El Capitan [EMAIL PROTECTED] writes:

 use Apache::Requst;
 
 sub handler() {
   my $r = Apache::Request-new(shift);
   my @list = $r-param('multi_list') || undef;
   ^^

scalar context is ruining your day :(
Try this instead:

my @list = $r-param('multi_list');

HTH
-- 
Joe Schaefer