PUT handling (somewhat off-topic)

2000-09-06 Thread Mark-Jason Dominus


I apologize in advance, because this isn't directly related to
mod_perl.  But I really wasn't sure where to ask.  Posting to
comp.infosystems.www.servers.unix didn't produce any result.  There
doesn't seem to be a mailing list for discussion of Apache generally.

I am trying to get apache to invoke a CGI program in response to PUT
requests.  This is a FAQ.  The FAQ instructions are very clear and
straightforward and don't work for me.

I have the following in the VirtualHost section in my httpd.conf:

   Script PUT /cgi-bin/Put

/cgi-bin is ScriptAliased correctly.  /cgi-bin/Put has permissions set
propserly and runs correctly from the shell and also when I send
Apache a GET request for it.

When I send Apache a PUT request using 'telnet', the request is
received.  However, my PUT script does not run.  Instead, Apache
fabricates a 200 response that looks like this:

HTTP/1.1 200 OK
Date: Tue, 05 Sep 2000 08:57:12 GMT
Server: Apache/1.3.6 (Unix) mod_perl/1.19
Connection: close
Content-Type: text/html

the body of the response is empty.

I know that /cgi-bin/Put isn't being run because it would have
produced a 206 response, not a 200 response,  because it would have produced
a nonempty body, and because it would have written a log to
/tmp/Put.err, which it didn't do.

The access log entry looks like this:

209.152.205.5 - - [05/Sep/2000:04:57:12 -0400] "PUT /~mjd/p/index.html 
HTTP/1.0" 200 0 "-" "-"

There is no entry in the error log.

I get the same behavior when I put the 'Script' directive into a
Directory section and send a PUT request for a file in the
directory.  

I don't want Apache to respond to the PUT request itself.  I want it
to run /cgi-bin/Put and have /cgi-bin/Put generate the response.  The
on-line manual and the FAQ all say that the

   Script PUT /cgi-bin/Put

directive that I have should do that, but it isn't doing it.  Does
anyone have any suggestions about what might be wrong, or about a more
appropriate forum in which to ask?





Re: PUT handling (somewhat off-topic)

2000-09-06 Thread Steve van der Burg

When I send Apache a PUT request using 'telnet', the request is
received.  However, my PUT script does not run.  Instead, Apache
fabricates a 200 response that looks like this:

I just added
   Script PUT /cgi-bin/put-handler
to my Apache config (apache 1.3.12  mod_perl 1.24 on Solaris 8 SPARC),
copied http://www.apacheweek.com/issues/put1 to put-handler, added
some more logging code, and tried uploading something from
Netscape Composer.

It worked like a charm, the first time, and the request was handled by
the script (the script's own log says what I expected it to say) which
means I've been of almost no help!

If it hadn't worked, I probably would've trussed Apache while I made the
request to see what was going on.

...Steve


-- 
Steve van der Burg
Information Services
London Health Sciences Centre
(519) 685-8300 ext 35559
[EMAIL PROTECTED]




PUT handling (somewhat off-topic)

2000-09-06 Thread mjd-perl-modperl


I apologize in advance, because this isn't directly related to
mod_perl.  But I really wasn't sure where to ask.  Posting to
comp.infosystems.www.servers.unix didn't produce any result.  There
doesn't seem to be a mailing list for discussion of Apache generally.

I am trying to get apache to invoke a CGI program in response to PUT
requests.  This is a FAQ.  The FAQ instructions are very clear and
straightforward and don't work for me.

I have the following in the VirtualHost section in my httpd.conf:

   Script PUT /cgi-bin/Put

/cgi-bin is ScriptAliased correctly.  /cgi-bin/Put has permissions set
propserly and runs correctly from the shell and also when I send
Apache a GET request for it.

When I send Apache a PUT request using 'telnet', the request is
received.  However, my PUT script does not run.  Instead, Apache
fabricates a 200 response that looks like this:

HTTP/1.1 200 OK
Date: Tue, 05 Sep 2000 08:57:12 GMT
Server: Apache/1.3.6 (Unix) mod_perl/1.19
Connection: close
Content-Type: text/html

the body of the response is empty.

I know that /cgi-bin/Put isn't being run because it would have
produced a 206 response, not a 200 response,  because it would have produced
a nonempty body, and because it would have written a log to
/tmp/Put.err, which it didn't do.

The access log entry looks like this:

209.152.205.5 - - [05/Sep/2000:04:57:12 -0400] "PUT /~mjd/p/index.html 
HTTP/1.0" 200 0 "-" "-"

There is no entry in the error log.

I get the same behavior when I put the 'Script' directive into a
Directory section and send a PUT request for a file in the
directory.  

I don't want Apache to respond to the PUT request itself.  I want it
to run /cgi-bin/Put and have /cgi-bin/Put generate the response.  The
on-line manual and the FAQ all say that the

   Script PUT /cgi-bin/Put

directive that I have should do that, but it isn't doing it.  Does
anyone have any suggestions about what might be wrong, or about a more
appropriate forum in which to ask?






Re: PUT handling (somewhat off-topic)

2000-09-06 Thread Mark-Jason Dominus


  If it hadn't worked, I probably would've trussed Apache while I made the
  request to see what was going on.
 
 I guess I'll try that, but I'm not expecting much.

That was the right thing to do.  The problem became apparent right
away: I had another handler installed for a parent directory of the
one I was trying to enable 'PUT' for.

Thanks very much.  Also thanks to Frank Wiles, who pointed my
attention at the relevant part of the manual.




Re: PUT handling (somewhat off-topic)

2000-09-06 Thread Mark-Jason Dominus


 It worked like a charm, the first time, 

Apparently it works like a charm for everyone but me, since none of
the instructions I've found on the net have admitted the possibility
that anything can go wrong.

Which is why I came here, to bother the experts.

 If it hadn't worked, I probably would've trussed Apache while I made the
 request to see what was going on.

I guess I'll try that, but I'm not expecting much.