Changed header pattern - #186
Open
boginw wants to merge 2 commits into
Open
Conversation
forresthopkinsa
commented
Sep 25, 2020
Contributor
The regex currently includes a colon in the middle to address standard headers like the example you gave: ([^:\s]+)\s*:\s*([^:\s]+) |
boginw
commented
Sep 26, 2020
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. |
forresthopkinsa
commented
Sep 27, 2020
Contributor
Ahh I understand. 👍 |
forresthopkinsa
approved these changes
Sep 27, 2020
forresthopkinsa
left a comment
Contributor
There was a problem hiding this comment.
build.gradle changes aren't necessary, but otherwise LGTM
boginwforce-pushed
the
master
branch
2 times, most recently
from
October 16, 2020 15:05
1b803ac to
9cb5e63Compareboginw
commented
Oct 16, 2020
Author
The PR now only includes the header change |
kientux
commented
Jan 13, 2021
Can someone merge this and release a new version please? |
boginw
commented
Sep 16, 2021
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 freeto 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: