Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailcard parameter matcher capturest rest of its segment #526

Closed
NekoiNemo opened this issue Aug 17, 2018 · 3 comments
Closed

Tailcard parameter matcher capturest rest of its segment #526

NekoiNemo opened this issue Aug 17, 2018 · 3 comments
Assignees
Labels
Milestone

Comments

@NekoiNemo
Copy link

NekoiNemo commented Aug 17, 2018

Example:
Using get("explore{path...}") handler, url ending with /explore/log/server.log will result in call.parameters.getAll("path") returning list containing: "explore, log, server.log", rather than just last 2

Using get("explore/{path...}"), however, returns only last 2 as expected

See https://kotlinlang.slack.com/archives/C0A974TJ9/p1534363258000100

@cy6erGn0m
Copy link
Contributor

Why 2 components are expected? I'd expect it to be "explore", "log", "server.log" or "", "log", "server.log". For sure "explore{path...}" and "explore/{path...}" are not the same patterns

@NekoiNemo
Copy link
Author

Well, i guess 3 starting with "" would be most logical one. Then again, empty segments are a bit pointless. But in any case, i don't think "explore", located outside of part captured by parameter, should be included

@cy6erGn0m cy6erGn0m self-assigned this Aug 24, 2018
@cy6erGn0m cy6erGn0m modified the milestones: 0.9.4, 0.9.5 Aug 24, 2018
@cy6erGn0m cy6erGn0m modified the milestones: 0.9.5, 1.1.2 Jan 16, 2019
cy6erGn0m pushed a commit that referenced this issue Jan 16, 2019
cy6erGn0m pushed a commit that referenced this issue Jan 16, 2019
@cy6erGn0m
Copy link
Contributor

Fixed ignoring prefix

jonasbark pushed a commit to jonasbark/ktor that referenced this issue Jan 16, 2019
* commit 'a7b406cf34cbaf1a767d226701003965d9f2740a': (28 commits)
  Improve HTTP client engine container documentation
  Add tailcard prefix support (ktorio#876, ktorio#526)
  Fix semaphore leave(locked coroutine without thread)
  Fix CIO headers parsing
  Fix client websocket nonce size
  Fix scheme parsing
  Await skipCancel in CIO client response pipeline
  Introduce default ktor exceptions and parameters delegation support
  Add word to dictionary
  Pull application property to ApplicationEngine interface
  Fix loosing errors in StatusPages if there was already a response sent
  Apply workaround to kotlin gradle MPP plugin bug
  Prohibit settings session after responding call
  Client: Support relative redirects by making #takeFrom() resolve relative urls. (ktorio#849)
  Add base64 cookies tests (related to ktorio#690)
  Move NonceManager to ktor-utils
  Reformat code according to the new codestyle
  Introduce NonceManager instead of OAuth2StateProvider
  Introduce withReplacedParameter on HttpAuthHeader
  Fix concurrent MessageDigest usage in server digest auth provider
  ...
schleinzer pushed a commit to schleinzer/ktor that referenced this issue Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants