Skip to content

Conversation

@elyscape
Copy link
Contributor

RFC1738 specifies that URL paths can legally contain ampersands:

; HTTP

httpurl        = "http://" hostport [ "/" hpath [ "?" search ]]
hpath          = hsegment *[ "/" hsegment ]
hsegment       = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
search         = *[ uchar | ";" | ":" | "@" | "&" | "=" ]

Accordingly, HAProxy (and potentially other applications) will not escape them in log files.

Fixes #54.

@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

@purbon
Copy link

purbon commented Nov 5, 2015

please jenkins, test this.

@purbon
Copy link

purbon commented Nov 5, 2015

@elyscape thanks a lot for your contribution, are you so nice to extend the current test with a "check" for this improvement? this would be required before we can move forward. Let me know if you have problems with it, I'm open to provide help for sure!

@elyscape
Copy link
Contributor Author

@purbon Updated. Sorry for the delay.

This allows for validating that a pattern will fail to match an entire
string, even if it would match partially.
RFC1738 specifies that URL paths can legally contain ampersands:

    ; HTTP

    httpurl        = "http://" hostport [ "/" hpath [ "?" search ]]
    hpath          = hsegment *[ "/" hsegment ]
    hsegment       = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
    search         = *[ uchar | ";" | ":" | "@" | "&" | "=" ]

Accordingly, HAProxy (and potentially other applications) will not
escape them in log files.
@elyscape
Copy link
Contributor Author

Updated again with some tests for invalid matches.

@elyscape
Copy link
Contributor Author

Pinging @ph and @jsvd for review.

@suyograo
Copy link
Contributor

LGTM

@elasticsearch-bot
Copy link

Suyog Rao merged this into the following branches!

Branch Commits
master a273a05, 939210b

elasticsearch-bot pushed a commit that referenced this pull request Mar 22, 2016
RFC1738 specifies that URL paths can legally contain ampersands:

    ; HTTP

    httpurl        = "http://" hostport [ "/" hpath [ "?" search ]]
    hpath          = hsegment *[ "/" hsegment ]
    hsegment       = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
    search         = *[ uchar | ";" | ":" | "@" | "&" | "=" ]

Accordingly, HAProxy (and potentially other applications) will not
escape them in log files.

Fixes #114
@elyscape elyscape deleted the fix-uripath branch March 22, 2016 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants