Bug #2042
WinXP case folding problem (with hgwebdir.cgi script)
| Status: | Fixed | Start date: | 2009-07-26 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % 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
Associated revisions
don't overwrite global server.force-lowercase-filenames setting (fixes #2042)
History
#1 Updated by mikahe almost 4 years ago
Correct Linux version is 1.4.19 (ssl)
#2 Updated by mikahe almost 4 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.
#3 Updated by mikahe almost 4 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.
#4 Updated by byates over 3 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.
#5 Updated by stbuehler over 3 years ago
- Target version changed from 1.4.24 to 1.4.x
- Missing in 1.5.x set to No
#6 Updated by stbuehler almost 3 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...
#7 Updated by stbuehler almost 3 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset r2757.
Also available in: Atom
