cecid / hermes

Hermes Messaging Gateway
BSD 2-Clause "Simplified" License
21 stars 17 forks source link

Invalid MIME type used #4

Closed iamhuwjones closed 6 years ago

iamhuwjones commented 6 years ago

https://github.com/cecid/hermes/blob/594b2849c4f3290955ee33d02574a1856be212f9/corvus-api/src/main/java/hk/hku/cecid/hermes/api/handler/EbmsSendMessageHandler.java#L152

I believe this should use application/xml or application/octet-stream

tomlee commented 6 years ago

According to the ebMSv2 specification Section 4.3.1 Behavior of the Sending MSH:

The Content-Type of the data part MUST be set to application/octet-stream.

tomlee commented 6 years ago

I'll close the issue for now.

evansdj7 commented 6 years ago

Hello the immediate issue is that the content type at the moment is being set to application/octet not application/octet-stream? application/octet is not a valid MIME type.

Also the referenced specification above is for ebMSv3.

The v2 specification is http://www.ebxml.org/specs/ebMS2.pdf ebMS v2 does not place a restriction on the attachment MIME type.

So the issue just now is that the MIME type in the implementation is not a valid one as published in the IANA list of MIME types.

iamhuwjones commented 6 years ago

Can the issue be reopened? It is not resolved as the code uses an invalid MIME type.

tomlee commented 6 years ago

Thanks for your help to fix the bug. Your pull request is merged.