Conversation
Contributor
|
The regex currently includes a colon in the middle to address standard headers like the example you gave: ([^:\s]+)\s*:\s*([^:\s]+) |
Author
|
Yes, and that is fine. The issue is the second group. Please see the following link, with the original regex and the body given in the example : regexr.com/5crbl. There you'll notice, that only the first word is recognized. What this PR does, is to capture the second group fully, by only terminating on a newline, instead of a colon. |
Contributor
|
Ahh I understand. 👍 |
forresthopkinsa
approved these changes
Sep 27, 2020
Contributor
forresthopkinsa
left a comment
There was a problem hiding this comment.
build.gradle changes aren't necessary, but otherwise LGTM
1b803ac to
9cb5e63
Compare
Author
|
The PR now only includes the header change |
|
Can someone merge this and release a new version please? |
Author
|
@NaikSoftware this issue is still present. Would you be so kind to review and merge this branch? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
According to the STOMP protocol specification 1.2; each header should be terminated with an EOL. Currently, the regex for headers stops if it sees a
:. This pull request fixes the regex.An example of a message that the current implementation can't handle is shown below: