|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
multipart MIME RFCs and Java Interop |
« View previous topic :: View next topic » |
Author |
Message
|
goffinf |
Posted: Thu Oct 25, 2012 1:50 am Post subject: multipart MIME RFCs and Java Interop |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
MB versions: 6.1.0.9 and 8.0.0.1
I would welcome any community experience comments for this one. We will probably raise a PMR so that we can understand v6.1 and v8 behaviours, but since these often take a while to wind thru ...
The real issue is about MB interop with Java applications around standards and RFCs (in my experience often gives rise to potential differences in interpretation). Might find that both are implemented correctly, just differently, we'll see.
There appears to be a potential issue in the way that Broker v6.1 parses multipart/related MIME messages received as a response to an HTTP Request (it might effect MQ as well … I haven’t tested that).
Its’ worth noting that this issue does NOT appear in MB v8, that is v8 is able to parse the response into the Parts/Part structure.
It is hard to be certain whether MB behaviour is consistent with the relevant RFCs (see ‘Additional Details’ below). The fact that v6.1 and v8 behave differently suggest that they might be implementing in a more relaxed or strict way or one of them is non compliant. That said, the RFCs don't seem entirely clear.
Cause:
Broker v6.1 expects the ENDING boundary marker to be followed by a CRLF.
Effect:
If the HTTP Request node has its Response Message Parsing Domain set to ‘MIME: For MIME wrapped data including multipart’, then the response message will NOT be correctly parsed into the expected Parts/Part structure and instead will show and error ‘Invalid Index’. Note: the node exits via the ‘out’ terminal, not ‘failure’.
Workaround:
We have a [temporary] work-around where we set the HTTP Request node’s Response Message Parsing Domain to ‘BLOB’, and follow it with a Compute node that appends x’0A0D’ and then an RCD node to reset the Domain to MIME. This works but is not ideal (and is not necessary under v .
Additional Information:
InfoCentre says this :-
* MIME multipart boundary delimiters are represented in 7-bit ASCII. The boundary delimiter consists of a line starting with a hyphen pair, followed by a boundary string. This sequence must not occur within the MIME message at any point other than as a boundary. A MIME end-delimiter is a hyphen pair, followed by the MIME boundary string, followed by a further hyphen pair. All delimiter lines must end in the ASCII sequence <CR><LF>. An example of a delimited message is:
• --MIME_boundary
• message data
• --MIME_boundary
• message data
--MIME_boundary--
RFCs 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types (http://tools.ietf.org/html/rfc2046).
Perhaps the key part is the way that implementers may/may not support the ‘epilogue’ (data following the ending boundary marker). RFC 2046 appears to strongly suggest that this area should be ‘ignored’ (see highlighted text below). However as the final extract shows, IF an epilogue *does* exist it is preceded by a CRLF (we are NOT receiving an epilogue).
5.1<http://tools.ietf.org/html/rfc2046#section-5.1>. Multipart Media Type 5.1.1<http://tools.ietf.org/html/rfc2046#section-5.1.1>. Common Syntax
The boundary delimiter line following the last body part is a distinguished delimiter that indicates that no further body parts will follow. Such a delimiter line is identical to the previous delimiter lines, with the addition of two more hyphens after the boundary parameter value.
--gc0pJq0M:08jU534c0p--
NOTE TO IMPLEMENTORS: Boundary string comparisons must compare the boundary value with the beginning of each candidate line. An exact match of the entire candidate line is not required; it is sufficient that the boundary appear in its entirety following the CRLF.
There appears to be room for additional information prior to the first boundary delimiter line and following the final boundary delimiter line. These areas should generally be left blank, and implementations must ignore anything that appears before the first boundary delimiter line or after the last one.
multipart-body := [preamble CRLF]
dash-boundary transport-padding CRLF
body-part *encapsulation
close-delimiter transport-padding
[CRLF epilogue]
HTTP 1.1 RFC 2616 - (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.2)
3.7.2 Multipart Types
MIME provides for a number of "multipart" types -- encapsulations of one or more entities within a single message-body. All multipart types share a common syntax, as defined in section 5.1.1 of RFC 2046
[40], and MUST include a boundary parameter as part of the media type value. The message body is itself a protocol element and MUST therefore use only CRLF to represent line breaks between body-parts. Unlike in RFC 2046, the epilogue of any multipart message MUST be empty; HTTP applications MUST NOT transmit the epilogue (even if the original multipart contains an epilogue). These restrictions exist in order to preserve the self-delimiting nature of a multipart message- body, wherein the "end" of the message-body is indicated by the ending multipart boundary. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Oct 25, 2012 2:08 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I'd look through the list of fixes in all levels of 7 and in 8.0.0.1 and see if there's a mention of this as an APAR.
If there is, open a PMR and see if it can get back ported. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|