Re: [OT] Redirect w/ Netscape browser causing 'Document contains no data'

2001-09-09 Thread Joel W. Reed

On Aug 23, [EMAIL PROTECTED] contorted a few electrons to say...
Daniel Little wrote:
 
 I seem to have a strange problem here with Netscape displaying the error
 'Document contains no data' when I do $Response-Redirect($location).
 

everytime i've ever gotten that it was because my
server side code had caused an apache process to core dump.

jr

-- 

Joel W. Reed412-257-3881
--All the simple programs have been written.



 PGP signature


Apache::ASP extra newline in script output start - killing IE pdf recognition

2001-04-27 Thread Joel W. Reed

Joshua,

i think i've got a good one for you. i'm using 2.09 btw.

lets say the beginning of a script is 

%@ LANGUAGE=PerlScript %
%
do neat perl things
%

the way Apache::ASP currently processes this we get 
the following output (please note the TWO NEWLINES
after Content-Type below)

Connecting to 193.9.211.182:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/pdf]

0K - ...HTTP/1.1 200 OK
Date: Fri, 27 Apr 2001 16:02:26 GMT
Server: Apache/1.3.14 (Unix)  (Red-Hat/Linux) mod_perl/1.24
Content-Disposition: inline; filename=Strategic-Leader.summary
-report.pdf
Cache-Control: private
Connection: close
Content-Type: application/pdf


%PDF-1.2
% W

the two newlines throws IE5+ off so that they don't realize
this is a PDF file (they have auto we know better than you
file sniffing code i believe). on PerlScript under IIS
however this does not happen  the same exact code works
fine.

am i doing something wrong? i think an improvement in
Apache::ASP would be to not replace %@ LANGUAGE=PerlScript %
with something to hold the line numbers the same 
(what your comments say) if Content-Type is not 
text/* - then we just remove the line  esp. the newline.

what do you think?

jr


Joel W. Reed412-257-3881
--All the simple programs have been written.



 PGP signature


Re: Apache::ASP extra newline in script output start - killing IE pdf recognition

2001-04-27 Thread Joel W. Reed

On Apr 27, [EMAIL PROTECTED] contorted a few electrons to say...
Philip On Fri, 27 Apr 2001, Joel W. Reed wrote:
Philip 
Philip  %@ LANGUAGE=PerlScript %
Philip  %
Philipdo neat perl things
Philip  %
Philip 
Philip Have you tried this:
Philip 
Philip @ LANGUAGE=PerlScript %%
Philip do neat perl things
Philip %

yes i did  it does work, but the problem is the
orig. script on windows works while under Apache::ASP
it does not.

jr

-- 

Joel W. Reed412-257-3881
--All the simple programs have been written.



 PGP signature


Apache::ASP - AS PerlScript compatibility request

2001-02-15 Thread Joel W. Reed

to be more fully compliant with ActiveState's PerlScript
we need the following methods on Apache::ASP::Collection
object.

sub Count -- # of keys in $Request-QueryString or $Request-Form

sub Key {
my ($self, $keynum) = @_;
}

attached are two test files  sample output under windows.

jr

-- 

Joel W. Reed412-257-3881
--All the simple programs have been written.



Title: test page




test page











%@ LANGUAGE=PerlScript %

!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
html
head
  meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"
  titletest page/title
/head
body
test page resultsbr
br
br
%
my $lname = $Request-Form("lname")-Item();
$Response-Write("lname from Request-Form(\"lname\")-Item(): " . $lname);
%
br
%
my $cnt = $Request-Form()-Count();
$Response-Write("lname from Request-Form()-Count(): " . $cnt);
%
br
%
for (my $i = 1; $i  $cnt; $i++)
{
$Response-Write("key $i is " . $Request-Form()-Key($i) . "br\n"); 
}
%
/body
/html

Title: test page






test page results


lname from Request->Form("lname")->Item(): reed

lname from Request->Form()->Count(): 4

key 1 is fname
key 2 is mname
key 3 is lname



 PGP signature


Re: [ANNOUNCE] Apache::ASP v2.07

2000-12-07 Thread joel w. reed

On Dec 06, [EMAIL PROTECTED] contorted a few electrons to say...
Joshua Hey,
Joshua 
Joshua The latest Apache::ASP 2.07 has made its way into CPAN, and is 
Joshua also available at:

Just thought i'd say a BIG THANKS to Joshua for Apache::ASP.
Its been a great help in developing cross platform web products.
Its been rather stable  Joshua is usually pretty responsive
when you need some help.

jr

-- 

Joel W. Reed412-257-3881
--All the simple programs have been written.



 PGP signature


[Apache::ASP] $Request-QueryString-('foo')-Item() support

2000-10-09 Thread joel w. reed

I'm trying to write an ASP app that runs under PerlScript and Apache::ASP.

i've found that with ActivePerl 618 -- $Request-QueryString-('foo')
return a reference to a Win32::OLE hash. 

to get a string from the hash you must write --
$Request-QueryString-('foo')-Item()
or you must use one of the hacks in the OLE.pm docs that come with ActivePerl.

$Request-QueryString-('foo')-Item() however doesn't work
under Apache::ASP. so i'm wondering if something like the patch
below would improve compatibility without hurting performance 
too much.

comments? suggestions? i know the patch below would need work
to support the "array of values" ASP thing...

--- /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pmTue Aug  1 19:42:18 2000
+++ /home/jreed/tmp/ASP.pm  Mon Oct  9 16:30:21 2000
@@ -2640,6 +2640,25 @@ sub ScriptOnFlush {
 
 1;
 
+package Apache::ASP::QsObj;
+
+sub new { 
+my $class = shift; 
+my $self = {};
+$self-{str} = shift;
+
+bless $self, $class;
+return $self;
+  };
+
+sub Item()
+  {
+my $self = shift;
+return $self-{str};
+  }
+
+1;
+
 # Request Object
 package Apache::ASP::Request;
 
@@ -2794,7 +2813,11 @@ sub Form 
 sub FileUpload 
   { shift-{FileUpload}-Item(@_) }
 sub QueryString 
-  { shift-{QueryString}-Item(@_) }
+  { 
+my $self = shift;
+my $key = shift;
+return new Apache::ASP::QsObj($self-{QueryString}-Item($key));
+  }
 sub ServerVariables 
   { shift-{ServerVariables}-Item(@_) }
 


-- 
--------
Joel W. Reed412-257-3881
--All the simple programs have been written.



 PGP signature


Re: [Apache::ASP] $Request-QueryString-('foo')-Item() support

2000-10-09 Thread joel w. reed

On Oct 09, [EMAIL PROTECTED] contorted a few electrons to say...
Joshua $Request-QueryString-('foo')-Item() isn't valid perl syntax, 
Joshua is it?  Are you going for $Request-QueryString('foo')-Item() 
Joshua support here?

yes $Request-QueryString('foo')-Item() seems to be the way AP618
wants you to convert the WIN32::OLE object to a perl string as in:

my $uid = $Request-QueryString('foo')-Item();

without the item it fails horribly in PerlScript.

Joshua 
Joshua There is already a Collection class that is used to emulate 
Joshua this kind of behavior, which can possibly be extended to 
Joshua meet this need.  One of the behaviors that this interface
Joshua supports is:
Joshua 
Joshua   $Request-QueryString-Item('foo')

which wouldn't work unfortunately for winblows without

$Request-QueryString-Item('foo')-Item()

Joshua 
Joshua Do you really need the above interface?  If so, I'll need
Joshua to create a config setting I imagine as there will be
Joshua a significant performance impact do doing something 
Joshua like you suggest.

really? that's a bummer. the only other option is to 
throw 

use Win32::OLE qw(in valof with OVERLOAD);

in the ASP pages when they are running under ActivePerl.
which kind of sucks too. (the above is found in the ActivePerl
docs for WIN32::OLE).

jr

-- 

Joel W. Reed412-257-3881
--All the simple programs have been written.



 PGP signature