[Pmwiki-users] New version no upload directives available for testing here
Patrick R. Michaud
pmichaud
Fri Jan 30 08:57:44 CST 2004
On Fri, Jan 30, 2004 at 12:11:55PM +0100, Christian Ridderstr?m wrote:
> On Thu, 29 Jan 2004, Patrick R. Michaud wrote:
> > Hmmm, I'm wondering what you had to do to achieve this, and if it would
> > help in configuring PmWiki to have non-ASCII characters in page names...?
> > Can you send me a couple of pointers/tips?
>
> Well, you can look at the code of course:
> http://www.lyx.org/~chr/demo/uploads/Upload/upload.php.txt
> and the corresponding code that implements it looks as follows:
> // $UploadCharPattern defines the characters allowed in a path
> SDV($UploadCharPattern, '(?:[^[:space:][:cntrl:][:punct:]]|[.+:_-])');
> SDV($UploadDirPattern, "(?:$UploadCharPattern+\\/)");
> SDV($UploadNamePattern,"(?:(\\/*$UploadDirPattern*)$UploadCharPattern+)");
Well, the problem I've had in the past hasn't been with the PHP patterns,
but in getting non-ASCII characters in URIs to work with various browsers
(specifically, Internet Explorer). So, I can create a URI with ISO-8859-1
characters okay, but then some browsers seem to munge the character
encodings somehow when they're in URIs so they don't come back the same
way they were sent.
For example, on the www.lyx.org site I went to
http://www.lyx.org/~chr/demo/pmwiki.php?pagename=Upload.NonEnglishCharacters
and the links for Attach:?.txt and Attach:?/aFile.txt don't work with
Internet Explorer. I get URIs that read
http://www.lyx.org/~chr/demo/uploads/Upload%2F%E5.txt
and http://www.lyx.org/~chr/demo/uploads/Upload%2F%E5%2FaFile.txt
both of which return 404 Not Found errors from apache.
(Just to pre-empt an answer: yes, I know it looks like one could
simply replace the %2F and %E5 with their ASCII equivalents, but
1. This doesn't answer *why* it's occurring
2. One would think that Apache would do the conversion, but it doesn't,
which indicates that there's something else going on here
3. In some previous tests I did with this, the non-ASCII characters
that IE sent weren't as obvious as the %2F%E5%2F listed above...
)
Pm
More information about the pmwiki-users
mailing list