Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/458.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 请求标头值在Chrome中转换为大写_Javascript_Ajax_Google Chrome_Sharepoint_Http Post - Fatal编程技术网

Javascript 请求标头值在Chrome中转换为大写

Javascript 请求标头值在Chrome中转换为大写,javascript,ajax,google-chrome,sharepoint,http-post,Javascript,Ajax,Google Chrome,Sharepoint,Http Post,我正在尝试从简单网页向SharePoint服务器发送http帖子。 此请求已在Internet Explorer上运行,但在Chrome上失败 $.ajax({ url:"http://redacted/_vti_bin/cellstorage.svc/CellStorageService", type:'POST', headers:{ 'MIME-Version': "1.0", 'SOAPAction':

我正在尝试从简单网页向SharePoint服务器发送http帖子。 此请求已在Internet Explorer上运行,但在Chrome上失败

$.ajax({
    url:"http://redacted/_vti_bin/cellstorage.svc/CellStorageService",
    type:'POST',
    headers:{
     'MIME-Version': "1.0",
     'SOAPAction': "http://schemas.microsoft.com/sharepoint/soap/ICellStorages/ExecuteCellStorageRequest",
     'Content-Type': "multipart/related; type=\"application/xop+xml\"; boundary=\"urn:uuid:8cfcbb22-dd52-4889-b29d-9ff2dcf909b2\"; start=\"<f13ad06d-8530-4af1-8cf3-d6d75c1635d4@tempuri.org>\"; start-Info=\"text/xml; charset=utf-8\"",
     'X-Vermeer-Content-Type': "application/x-www-form-urlencoded"
    },
$.ajax({
url:“http://redacted/_vti_bin/cellstorage.svc/CellStorageService",
类型:'POST',
标题:{
“MIME版本”:“1.0”,
“SOAPAction”:“http://schemas.microsoft.com/sharepoint/soap/ICellStorages/ExecuteCellStorageRequest",
“内容类型”:“多部分/相关;类型=\”应用程序/xop+xml\“边界=\”urn:uuid:8CFCB22-dd52-4889-b29d-9ff2dcf909b2\“开始=\”开始信息=\“文本/xml;字符集=utf-8\”,
“X-Vermeer-Content-Type”:“应用程序/X-www-form-urlencoded”
},
我的测试表明,我正在联系的Web服务(/\u vti\u bin/cellstorage.svc/CellStorageService)将失败,除非请求头大小写保持不变:

内容类型:多部分/相关;Type=“应用程序/xop+xml”; boundary=“urn:uuid:8cfcb22-dd52-4889-b29d-9ff2dcf909b2”; start=“f13ad06d-8530-4af1-8cf3-d6d75c1635d4@tempuri.org"; start Info=“text/xml;字符集=utf-8

然而,Chrome似乎会自动将请求头值从“utf-8”转换为“utf-8”,这可以通过fiddler输出进行确认。这会导致错误:

职位http://redacted/_vti_bin/cellstorage.svc/CellStorageService 400 (请求错误)

内容类型:多部分/相关;Type=“应用程序/xop+xml”; boundary=“urn:uuid:8cfcb22-dd52-4889-b29d-9ff2dcf909b2”; start=“f13ad06d-8530-4af1-8cf3-d6d75c1635d4@tempuri.org"; start Info=“text/xml;字符集=UTF-8

由于我无法真正更改服务器服务,我想知道是否有办法强制Chrome使用小写头值而不是转换它们

类似职位:


这导致了chrome上的amazon aws身份验证(GetFederationToken)问题,而不是firefox或IE,因为它被用作签名头签名,我花了几个小时跟踪了这个问题,希望这能在遇到签名不匹配问题时拯救其他人

我认为chrome没有任何理由选择大写UTF-8:


这导致了chrome上的amazon aws身份验证(GetFederationToken)问题,而不是firefox或IE,因为它被用作签名头签名,我花了几个小时跟踪了这个问题,希望这能在遇到签名不匹配问题时拯救其他人

我认为chrome没有任何理由选择大写UTF-8: