Hi,

I was getting the error "Identifier too long" with some requests
and eventually found the cause to be in Apache::Registry.
The problem occurred when the URL to the script was too long,
i.e. larger than around 250 characters. I found that Perl allows
only a limited number of characters for a package name and
Apache::Registry uses the URI to create the package name.

In my case the URI can become large because specially formated
URLs are being AliasMatch-ed to a Apache::Registry script.
So the filename of the script is much shorter and I changed
my Apache::Registry to now use the filename to generate a
package name instead of the URI.

So I'm wondering if in the general case it is maybe safer to use
the filename instead of the URI to create the package name.
Also I wonder if there is any downside to using the filename.

The change I made to Registry.pm is simple:

> diff Registry.pm.old Registry.pm

72,74c72
<       my $script_name = $path_info && $uri =~ /\Q$path_info\E$/ ?
<           substr($uri, 0, length($uri)-length($path_info)) :
<           $uri;
---
>       my $script_name = $filename;

If it makes sense I would like to request to include
this change into the official Apache::Registry release.

Thanks,
Marcus



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to