Bug 1779 - Globalization/output encoding is ignored, when running ASP.NET application outside root url
Summary: Globalization/output encoding is ignored, when running ASP.NET application ou...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-10-29 11:26 UTC by Christopher Pereira
Modified: 2011-10-30 14:48 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 1779 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Christopher Pereira 2011-10-29 11:26:37 UTC
When running the application outside the root URL ("http://localhost/here/" instead of "http://localhost/"), globalization is ignored and there is no way to get output encoded in iso-8859-1.

Instructions for reproducing this bug:

1) Create /opt/testcase/test.aspx containing:

<%
Response.Write(Request.QueryString["a"]);
%>

and add a custom web.config file with:

                <globalization
                    fileEncoding="iso-8859-1"
                    requestEncoding="iso-8859-1"
                    responseEncoding="iso-8859-1"
                    />

2) Configure the app to run in the location "/here/", ie:

Alias /here "/opt/testcase" (DOESN'T WORK...globalization is ignored)

Alias / "/opt/testcase" (WORKS OK)

3) Execute test.aspx with:
http://localhost/here/test.aspx?a=Revisi%F3n

(*) Note that "%F3" is the encoded "ó" character.

4) Expected result:
Revisión

5) Result:
Revisi?n

Notes:
- Globalization was configured to encode output using iso-8859-1
- The problem is not related with the encoding configured/detected on the browser/client (the server sends a UTF-8 charset in the headers). Forcing the encoding will not work.
- It is important to notice that the encoding depends on the location ("/" or "/here")
- Apache encoding configuration is also to be ignored...I found no way to control the output encoding when running the application in "/here".
- I reproduced this bug in different Linux distributions (Ubuntu, CentOS) and mono versions (2.10.1, 2.10.5-1).
Comment 1 Zoltan Varga 2011-10-30 14:48:08 UTC
-> sys.web.