httpd headers for $r-internal_redirect_handler

1999-11-11 Thread Oleg Bartunov

Hi,

I'm trying to use RandPictire.pm from the Book with internal redirect
and it works fine. But in this case URL /random/picture  remains the same
and browser caches output ( I have default expire headers for images
"access plus 100 days" ). To avoid this I tried to set httpd header with
Pragma: no-cache but has no success. Is it possible to supply
correct http headers for internal redirect ?

Here is a code:

   my $headers = $r-headers_out;
   $headers-{'Pragma'} = $headers-{'Cache-control'} = 'no-cache';
   $r-no_cache(1);
   $r-internal_redirect_handler("${lucky_one}");
   return OK;


Regards,

Oleg


_
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83



Re: Trying not to re-invent the wheel

1999-11-11 Thread Randal L. Schwartz

 "Joshua" == Joshua Chamas [EMAIL PROTECTED] writes:

Joshua What Matt brought up is right.

Eewww.  Whenever I read "matt" and "w(right)" in the same sentence,
all sorts of alarms go off.  Sorry.

:-)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



ANNOUNCE: Authen::Ticket 0.01

1999-11-11 Thread James G Smith

The URL

ftp://ftp.jamesmith.com/pub/perl/Authen/Authen-Ticket-0.01.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/J/JS/JSMITH/Authen-Ticket-0.01.tar.gz
  size: 19614 bytes
   md5: b5bc124ebd5540200c9a4f38281c32c9

Authen::Ticket provides the framework for implementing a ticketing system
for web authentication.  Both the client website and ticket server code
can be constructed from Authen::Ticket.  The current version requires
cookies to operate correctly.

The framework allows for customization at all phases in the process.  This
includes not only the login screens, but the cookie creation and optional
digital signature algorithm as well.

The ticket signature code (Authen::Ticket::Signature) allows for
signature creation and verification of tickets as well as a handler to
provide a key server.

The code is split into four components:

Authen::Ticket mod_perl handler for both server and client
Authen::Ticket::Server base ticket server code
Authen::Ticket::Client base ticket client code
Authen::Ticket::Signature  base code for providing signed tickets

A sample sub-class to handle authentication via Net::PH is provided.

The Authen::Ticket(::(Server|Client))? code expects MIME::Base64, Carp, and
CGI.  Authen::Ticket::Signature expects OpenSSL (not SSLeay) and Apache::File.


BUGS


o Tickets must not expire during a POST.  This will cause all POST
  data to tbe lost.

o Shared memory support is not robust enough.  Certain conditions
  can cause the server to enter an endless cycle of child destruction
  and creation.
--
James Smith [EMAIL PROTECTED], 409-862-3725
Texas AM CIS Operating Systems Group, Unix



RE: EMBPERL ENQUIRY

1999-11-11 Thread Gerald Richter

I forward this to the modperl mailing list maybe somebody there could give
you an hint, or point you an url where you can find the requested
information. At least I can say, what you like todo is possible with Perl,
Embperl (and maybe modperl), but I can't give you more introduction then you
find on http://perl.apache.org/embperl, you may also check out
http://perl.apache.org/

Gerald

---
Gerald Richter  ecos electronic communication services gmbh
Internet - Infodatenbanken - Apache - Perl - mod_perl - Embperl

E-Mail: [EMAIL PROTECTED] Tel:+49-6133/925151
WWW:http://www.ecos.de  Fax:+49-6133/925152
---


 -Original Message-
 From: Kemi Odu [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 11, 1999 4:48 PM
 To: '[EMAIL PROTECTED]'
 Subject: EMBPERL ENQUIRY
 Importance: High


 Dear Mr G.Richter,

 Please kindly provide some insight into the best way to go in the
 development of an intranet that I am currently undertaking. I have read
 many documentation on PERL and I am not so sure on the best way to go. On
 further investigation I came across your web site and read about
 Embperl -
 Embed Perl in Your HTML Documents,  which I am excited about.
 Let me put you in the project picture. Basically, I have written my web
 front pages in HTML and the Database in Access 97. I now have to connect
 the two together for tasks like UserID and password validation;
 Retrieving/displaying Addresses using various search criteria; Performing
 Keyword Searches and displaying the result etc.

 I thought that what I needed was just the PERL program; DBI;
 DBD:ODBC. But
 I now realise that I have to make the images on the HTML pages to accept
 Events (Click, Menu Selection)  which would be run as PERL scripts upon
 triggering, I suppose that I would have to write PERL scripts
 with the HTML
 scripts.

 Please advise me on the ALL the development tools/resources I
 need and how
 Embperl fits in.

 I look forward to your prompt reply and thanks you in advance for your
 assistance.

 Best Regards,
 Kemi Odu
 mailto:[EMAIL PROTECTED]





Re: DBI::ODBC SQL Server and Solaris x86

1999-11-11 Thread Matt Sergeant

On Thu, 11 Nov 1999, Rex Staples wrote:
 I am trying to port a mod_perl app written to interface an oracle database to
 an app interfacing a MS SQL Server database.  Anyone know where I can get a SQL
 Server driver manager for Solaris x86?

This isn't a mod_perl question. Try kicking whoever made you use SQL
Server. If it's 6.5 the Sybase drivers work.

-- 
Matt/

Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.



Re: $r-run with no headers

1999-11-11 Thread Rick Myers

On Nov 11, 1999 at 07:21:00 +, Rick Myers twiddled the keys to say:
 Quite simply, I can't set headers on a -run. I've tried before the
 fact, as well as within the object itself. Anybody have any pointers?

Answering my own question...

  $lookup = $r-lookup_uri( $somewhere );
  $r-headers_out-add( anything = 'whatever' );
  $r-send_http_header;
  $lookup-run;

RTFM :)

Rick Myers[EMAIL PROTECTED]

The Feynman Problem   1) Write down the problem.
Solving Algorithm 2) Think real hard.
  3) Write down the answer.



Re: DBI

1999-11-11 Thread Ed Phillips

This is also not a mod_perl question.

depending on where your DBD::Oracle is installed you can get away with certain 
liberties in the Oracle library department. 

Nonetheless, you should continue your inquiry on a DBI related list.

Thank you,

Ed



Apache::Registry and 304 status code in log file

1999-11-11 Thread Bill Moseley

In an Apache::Registry script I'm print()ing

   Status: 304 Not Modified

when the client sends an If-Modified-Since: header.

The 304 error is returned to the client properly, but the log file shows a
200 status.  Can I make Apache log the access as a 304 with my
Apache::Registry script?  The same script runs someplace else as mod_cgi.

Thanks,

BTW -- In perldoc Apache::Registry

I'm sure this is known, but...

 Location /perl
  SetHandler perl-script
  PerlHandler Apache::Registry
  Options ExecCGI
  ...
  /Directory  -- shouldn't this be /Location




Bill Moseley
mailto:[EMAIL PROTECTED]



Re: Handling directory requests with a PerlHandler

1999-11-11 Thread John Siracusa

On 11/11/99 7:49 PM, John Siracusa wrote:
 $uri .= 'index.html';
 # /dir/ is now /dir/index.html
 my($sr) = $r-lookup_uri($uri);
 return $sr-run();
 
 it appears to work, but the headers I get are simply:
 
 HTTP/1.0 200 OK
 Date: Fri, 12 Nov 1999 00:25:44 GMT
 
 No content type!  I've tried explicitly setting $sr's content_type()
 before I run() it and that doesn't work either.

In the grand tradition of asking for help, I solved this bit seconds
after I sent the email :)

my($sr) = $r-lookup_uri($uri);
$r-send_http_header('text/html');
return $sr-run();

The bit I was missing was that I have to call send_http_header() on the
*original* request object $r, not the subrequest $sr.

I'm still not sure how to correctly search for "index-ish" files
(as per the server configuration) rather than explicitly tacking on
the constant string "index.html", however.  How does apache do this
internally?

-John