Are URIs case-insensitive?

后端 未结 6 1467
再見小時候
再見小時候 2020-12-06 16:05

When comparing two URIs to decide if they match or not, a client
SHOULD use a case-sensitive octet-by-octet comparison of the entire
URIs, with th

6条回答
  •  庸人自扰
    2020-12-06 16:47

    Whether or not URLs are treated as case-sensitive also depends on the web server. For example, Microsoft IIS servers do not treat URLs as case-sensitive.

    The following URLs (hosted on a Microsoft IIS server) are both treated as equivalent:

    • http://www.microsoft.com/default.aspx
    • http://www.microsoft.com/Default.aspx

    However, Apache servers do treat URLs as case-sensitive are classed as two different resources:

    • http://httpd.apache.org/index.html
    • http://httpd.apache.org/Index.html

    Technically, Apache is following the standards correctly here, and Microsoft is going against the specification… Oh well – “old habits die hard,” they say!

提交回复
热议问题