We have a third party software that expects the incoming Content-Type to be explicitly:
application/x-www-form-urlencoded
However, in our ASP script below, even though we set the request header appropriately, ASP is actually sending it as:
application/x-www-form-urlencoded; charset=utf-8
As a result, authentication fails and since it's third party, we may not be at liberty to patch it ourselves as future updates may override our modifications.
How can we explicitly force the Content-type and prevent "; charset=utf-8" from being appended?
<%
'IRISLink.cgi expects application/x-www-form-urlencoded
Dim obHTTP
obHTTP.open "POST", "https://" & DWHost & "/IRISLink.cgi", False
obHTTP.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
obHTTP.Send strPost
Set obHTTP = Nothing
'Failure - Actual Content-type received was: application/x-www-form-urlencoded; charset=utf-8
%>