Bug #2042

WinXP case folding problem (with hgwebdir.cgi script)

Added by mikahe about 1 year ago. Updated 26 days ago.

Status:Fixed Start:07/26/2009
Priority:Normal Due date:
Assigned to:- % Done:

100%

Category:-
Target version:1.4.27
Missing in 1.5.x:No

Description

Files (and directories) can't be loaded when hosting Mercurial repositories in WinXP using LightTPD (versions 1.4.13 to 1.4.23-1 Win32-SSL versions tested) if they contain capital letters. Lower case names work ok. Same problem does not occur in Linux version 1.3.19 (ssl). This is possibly related to file/dir name case folding, e.g. File1.txt->file1.txt (full trace attached):

2009-07-26 04:51:10: (response.c.391) -- before doc_root
2009-07-26 04:51:10: (response.c.392) Doc-Root : C:/work/repo/
2009-07-26 04:51:10: (response.c.393) Rel-Path : /hgwebdir.cgi/dummytest/mercurialdummytest/file/3e4033101a00/File1.txt
2009-07-26 04:51:10: (response.c.394) Path :
2009-07-26 04:51:10: (response.c.442) -- after doc_root
2009-07-26 04:51:10: (response.c.443) Doc-Root : C:/work/repo/
2009-07-26 04:51:10: (response.c.444) Rel-Path : /hgwebdir.cgi/dummytest/mercurialdummytest/file/3e4033101a00/file1.txt
2009-07-26 04:51:10: (response.c.445) Path : C:/work/repo/hgwebdir.cgi/dummytest/mercurialdummytest/file/3e4033101a00/file1.txt
:
2009-07-26 04:51:15: (response.c.126) Response-Header:
HTTP/1.1 404 Not Found

LightTPD_win32_case_folding.txt (3.5 KB) mikahe, 07/26/2009 08:37 am

lighttpd-me.conf (11.7 KB) mikahe, 07/26/2009 08:37 am

Associated revisions

Revision 2757
Added by stbuehler 26 days ago

don't overwrite global server.force-lowercase-filenames setting (fixes #2042)

History

Updated by mikahe about 1 year ago

Correct Linux version is 1.4.19 (ssl)

Updated by mikahe about 1 year ago

Module response.c (1.4.23) lines 412-418 seem to cause this:

/* MacOS X and Windows can't distiguish between upper and lower-case
 *
 * convert to lower-case
*/
if (con->conf.force_lowercase_filenames) {
buffer_to_lower(con->physical.rel_path);
}
However, adding conf option
server.force-lowercase-filenames = "disable"

didn't seem to disable this feature.

Updated by mikahe about 1 year ago

It looks like removing the quoted response.c lines fix the problem (v.1.4.13 tested as there are some Cygwin build problems with 1.4.23 (/w Cygwin version 1005.25.0.0/1.5.25-15).

This might cause some other issues, so this is by no means a proper fix.

Updated by byates 11 months ago

  • Target version set to 1.4.24

I am seeing the exact same problem. It would be nice if when server.force-lowercase-filenames was set to "disable" NO filenames would be forced to lowercase. While this might present a security issue, it would be an acceptable fix.

Updated by stbuehler 11 months ago

  • Target version changed from 1.4.24 to 1.4.x
  • Missing in 1.5.x set to No

Updated by stbuehler 26 days ago

  • Target version changed from 1.4.x to 1.4.27

I really think it is stupid to use lighty on windows (and i think it is stupid to use case-insensitive filesystems).

I still will try to patch it so it doesn't overwrite the lowercase option...

Updated by stbuehler 26 days ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2757.

Also available in: Atom