I am attempting to consume a third party WebService in Visual Studio 2008 and am getting a unique response back from the server. This return has two content-type tags.
HTTP/1.0 200 OK
Server: SMBDK_1/2.3.0
Date: Thu, 09 Aug 2012 18:59:14 GMT
Connection: close
Content-Length: 670
Content-Type: text/html; charset=ISO-8859-1
Content-Type: text/xml
Expires: Thu, 09 Aug 2012 18:59:14 GMT
Last-Modified: Thu, 09 Aug 2012 18:59:14 GMT
Is this a common and valid SOAP response or an oddity?
I can't comment on how common it is, but it is not valid (although it fails validity at the HTTP level rather than the SOAP level).
Since we have two content-types:
From http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 :
Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [ie, #(values)].
So let us look at the content-type header:
From http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 :
Content-Type = "Content-Type" ":" media-type
and then we expand media-type
:
media-type = type "/" subtype *( ";" parameter ) type = token subtype = token
That isn't a comma-separated list.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.