perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurice Aubrey <>
Subject Re: Hiccup with long file paths using $Response->Redirect
Date Mon, 18 Feb 2002 13:45:21 GMT
Hi Chris.

On Sun, Feb 17, 2002 at 09:54:45AM -0800, Christopher Brown wrote:
> Generally, this works, except when the real path to
> page2.html has too many characters.  The error occurs
> when Apache-ASP translates the redirect to a real
> path.  It is not a 404 error at the browser side,
> which is what I would expect to find in your scenario.
> When I move my site to higher in the directory
> hierachy -- all else being equal -- it works fine.
> Strange.

I think you're exceeding a Perl limit on the length of function
names.  From perldiag:

  Identifier too long
    (F) Perl limits identifiers (names for variables,
    functions, etc.) to about 250 characters for simple
    names, and somewhat more for compound names (like
    `$A::B').  You've exceeded Perl's limits.  Future verĀ­
    sions of Perl are likely to eliminate these arbitrary

>From your log I see:


which is 257 characters.  I just tried to define it in a test
script and received the same identifier too long error.

Joshua will likely want a better fix that preserves as
much of the path info as possible, but you can try this
simple patch against 2.31 that shortens the function name
and see if it solves the problem:

---	Mon Feb 18 05:13:08 2002
+++	Mon Feb 18 05:21:42 2002
@@ -431,7 +431,7 @@
 	my $id = $file_id.'x'.$self->{compile_checksum};
 	$id =~ s|/+|/|g;
 	$id =~ s/\W/_/g;
-	$self->{id} = '__ASP_'.$id;
+	$self->{id} = '__ASP_'. md5_hex($id);
     # filtering support


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message