c:multipart content-type attribute vs. header

Hi all,

7.1.10.2 (Request Entity body conversion) says this about p:multipart:

"If the content-type attribute is not specified, a value of
"multipart/mixed" will be assumed."

So, am I right that the following will cause err:XC0020 (because the
value of the Content-Type header is inconsistent)?

<c:request method="post" href="...">
  <c:header name="Content-Type" value="multipart/related"/>
  <c:multipart boundary="...">...</c:multipart>
</c:request>

Or... is the test multipart-002.xml (which uses the above c:request and
assumes it is fine) correct and "multipart/related" will be used in this
case?

On c:body, @content-type is required, but it is optional on c:multipart.
Personally, I would say the same "strict" semantics applies, so even if
no @content-type is specified on c:multipart, the processor behaves as
if "multipart/mixed" was specified - and in that case, any extra
Content-Type headers must be consistent with that.

What do you think?

Regards,
Vojtech


--
Vojtech Toman
Principal Software Engineer
EMC Corporation
toman_vojtech@emc.com
http://developer.emc.com/xmltech

Received on Monday, 11 January 2010 14:54:33 UTC