I'm attempting to make an http post from a simple web page to a SharePoint server. This request is already working on Internet Explorer but fails on 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=\"<[email protected]>\"; start-Info=\"text/xml; charset=utf-8\"",
'X-Vermeer-Content-Type': "application/x-www-form-urlencoded"
},
My tests show that the webservice I'm contacting (/_vti_bin/cellstorage.svc/CellStorageService) will fail unless the request header case is left unchanged:
Content-Type: multipart/related; type="application/xop+xml"; boundary="urn:uuid:8cfcbb22-dd52-4889-b29d-9ff2dcf909b2"; start="[email protected]"; start-Info="text/xml; charset=utf-8"
However, Chrome seems to automatically convert the request header value from "utf-8" to "UTF-8", which can be confirmed through the fiddler output. This causes an error:
POST http://redacted/_vti_bin/cellstorage.svc/CellStorageService 400 (Bad Request)
Content-Type: multipart/related; type="application/xop+xml"; boundary="urn:uuid:8cfcbb22-dd52-4889-b29d-9ff2dcf909b2"; start="[email protected]"; start-Info="text/xml; charset=UTF-8"
Since I can't really change the server service, I wonder if there is a way to force Chrome to use lowercase header values instead of converting them.
Similar posts:
