Closed giovanni-orciuolo closed 1 year ago
What’s the content type value coming from your service? I believe we should be able to use strings.HasPrefix
here.
What’s the content type value coming from your service? I believe we should be able to use
strings.HasPrefix
here.
I get this string:
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
So I believe we could theoretically use application/xop+xml as a prefix
Right, I have always seen the type and subtype first and extra attributes coming after.
Alright, so can I make a commit with HasPrefix and merge?
Yes
If we were to do this better, it would be by using a more robust parser: https://pkg.go.dev/mime
Yeah, but I believe the only 2 cases we have at the moment are application/soap+xml
and text/xml
in start-info
. Should more cases arise, we should consider using that library
We also have the one raised in #217
The one coming in the mtom header.
I think we both had the exact same problem and solved it in the same way. The commits do the same thing. You can choose which one your prefer to merge ^^
Can you merge this PR into the base library? I need it in a production environment
I added more comprehensive checks inside the getBinaryFields
function, in order to account for a vast amount of cases in the XML response (e.g. slices, pointers, etc...) in order to populate the binary fields.
@c4milo Can we merge this?
Makes more MTOM-based services work correctly. Sometimes, some services do not use the exact names in their headers.