httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject [BUG]: "Listing with filename including swedish is wrong" on Solaris 2.x (fwd)
Date Fri, 28 Feb 1997 08:27:44 GMT

Acked.

---------- Forwarded message ----------
Date: Thu Feb 27 13:58:40 1997
From: Lesley.Stoa@capgemini.se
To: apache-bugs%apache.org@organic.com
Subject: [BUG]: "Listing with filename including swedish  is wrong" on Solaris 2.x

Submitter: Lesley.Stoa@capgemini.se
Operating system: Solaris 2.x, version: 
Version of Apache Used: 1.1.1 and 1.2b7
Extra Modules used: mod_dir
URL exhibiting problem: -

Symptoms:
--
When listing a directory with files that have
e.g. swedish  in the filename, apache should
escape this (e.g.  -> %f6)in the HREF, but all 
these letters are erroneous escaped to %ff.

I searched the code and found that this is done in
util.c: the variable holding the character to be
escaped is declared as char, but it must be declared
as an unsigned char to work correctly!

To fix it, I changed the #define of c2x on line 786
in util.c from

#define c2x(what,where) sprintf(where,"%%%02x",what)

to

#define c2x(what,where) sprintf(where,"%%%02x",(unsigned char) what)

After this change, the swedish characters  are
escaped correct.

The error is still present in 1.2b7.

Regards,
      Lesley Stoa, Cap Gemini, Sweden

--

Backtrace:
--

--



Mime
View raw message