Project

General

Profile

Actions

Bug #2042

closed

WinXP case folding problem (with hgwebdir.cgi script)

Added by mikahe over 15 years ago. Updated over 14 years ago.

Status:
Fixed
Priority:
Normal
Category:
-
Target version:
ASK QUESTIONS IN Forums:

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


Files

LightTPD_win32_case_folding.txt (3.45 KB) LightTPD_win32_case_folding.txt mikahe, 2009-07-26 08:37
lighttpd-me.conf (11.7 KB) lighttpd-me.conf mikahe, 2009-07-26 08:37
Actions #1

Updated by mikahe over 15 years ago

Correct Linux version is 1.4.19 (ssl)

Actions #2

Updated by mikahe over 15 years 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.

Actions #3

Updated by mikahe over 15 years 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.

Actions #4

Updated by byates about 15 years 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.

Actions #5

Updated by stbuehler about 15 years ago

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

Updated by stbuehler over 14 years 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...

Actions #7

Updated by stbuehler over 14 years ago

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

Applied in changeset r2757.

Actions

Also available in: Atom