[Mono-bugs] [Bug 520027] New: HttpResponse.WriteFile(filename) fails when filename case doesn't match filesystem case regardless of IOMAP setting
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Jul 7 21:33:31 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=520027
Summary: HttpResponse.WriteFile(filename) fails when filename
case doesn't match filesystem case regardless of IOMAP
setting
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: steve at smartz.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1;
Trident/4.0; GTB6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR
3.0.04506.30; .NET CLR 3.0.04506.648; InfoPath.2; .NET CLR 3.5.21022; .NET CLR
3.5.30428; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3;
OfficeLivePatch.0.0)
Given:
a valid file named /testme.txt on the filesystem
mod mono configuration setting MonoSetEnv MONO_IOMAP=all
The following code will fail in response.WriteFile():
public void TestWrite(HttpResponse response)
{
string filename = "/TestMe.txt";
if (File.Exists(filename))
response.WriteFile(filename);
}
File.Exists observes the IOMAP setting and returns TRUE regardless of the
casing mismatch.
response.WriteFile() fails to write the file to the response.
If I change the filename on the disk to /TestMe.txt OR I change the code to
look like:
public void TestWrite(HttpResponse response)
{
string filename = "/testme.txt";
if (File.Exists(filename))
response.WriteFile(filename);
}
It works fine.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list