Why it is converting to lowercase? In Firefox it goes as: "X-Requested-With". While in IE, it goes as: "x-requested-with"
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Using :remote => true with hover event
- Is there a way to play audio on a mobile browser w
The HTTP method is supposed to be case-sensitive, but the HTTP headers are supposed to be case-insensitive, according to RFC 2616.
I had noticed something similar. Take a look at the sample code and what it does when I add some custom HTTP headers. First is the JavaScript code and then is the Fiddler dump (custom headers only) from IE8, Safari4 and Firefox3. Notice that Firefox honors case, IE converts to lowercase and Safari converts to propercase.
However, as already mentioned, these are treated as case insensitive by the server so it really doesn't matter.
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Safari/528.17
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)