You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pierDipi
changed the title
fix: strip parameters from data content types to assess if it's JSON …
fix: strip parameters from data content types to assess if it's JSON format
Oct 3, 2022
** This may apply to much more than just the JSON format serialization.
Don't the various transport bindings also check for content-type such as application/cloudevents+json ?? theoretically those checks should also include this type of stripping.
I'm not sure if now is the time but we may want to break all of this stuff out into a some core utilities that can be shared across all of the formats and transports .. most specifically "take a content-type and strip off all the trailing attributes" and "isJson(stripped-content-type)" type functions.
Not sure if we should address this now or add it as a followup .. it might need a bit more analysis to see where everybody is doing a comparison on content-type.
@JemDay I'm not sure this comment is directed to me but...
it makes sense to me, for the potential to be needed elsewhere. However, I'm not familiar with this particular project, so I'd individually prefer to defer refactoring in a different context than this PR.
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this regex can be simplified so that it simply matches anything following the ";" so something like "(;.*)*$" - my regex may be a bit rusty. ;-)
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #481
Signed-off-by: Frederic Delechamp fdelechamp@guidewire.com