Is IIS performing an illegal character substitution? If so, how to stop it?

后端 未结 3 1065
执笔经年
执笔经年 2020-12-14 15:14

Context: ASP.NET MVC running in IIS, with a a UTF-8 %-encoded URL.

Using the standard project template, and a test-action in HomeController like:

<
3条回答
  •  南方客
    南方客 (楼主)
    2020-12-14 15:22

    Once Upon A Time, URLs themselves were not in UTF-8. They were in the ANSI code page. This facilitates the fact that they often are used to select, well, pathnames in the server's file system. In ancient times, IE had an option to tell whether you wanted to send UTF-8 URLs or not.

    Perhaps buried in the bowels of the IIS config there is a place to specify the URL encoding, and perhaps not.

提交回复
热议问题