-
Notifications
You must be signed in to change notification settings - Fork 504
Add request parameters to identified request path in the io.l5d.path
identifier
#1734
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
Conversation
016a8a3
to
8b5fed5
Compare
…path Signed-off-by: Dennis Adjei-Baah <[email protected]>
108d50c
to
f7eee3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good. Thanks for adding new tests that capture this.
def apply(req: Request): Future[RequestIdentification[Request]] = | ||
req.path.split("/").drop(1) match { | ||
case path if path.size >= segments => | ||
val params = req.getParams() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than getting and re-encoding the query string, I would just do something like:
val query = {
val u = req.uri
u.indexOf('?') match {
case -1 => ""
case n => u.substring(n)
}
}
Signed-off-by: Dennis Adjei-Baah <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐ 🏡 ❓ 🗡
## 1.3.4 2017-12-15 Linkerd 1.3.4 continues the focus on reliability and stability. It includes a bugfix for HTTP/2 and gRPC routers, several improvements to the Consul namer and dtab store, fixes for 4xx responses in the Kubernetes namer, and more. * Fix an issue where the `io.l5d.path` identifier would consume query parameters from the request URL, preventing them from reaching the downstream service ([#1734](#1734)). * Several minor fixes to documentation and examples. * Consul * Improve handling of invalid namespaces in Namerd's Consul dtab store ([#1739](#1739)). * Add backoffs to Consul dtab store observation retries ([#1742](#1742)). * Fix `io.l5d.consul` namer logging large numbers of spurious error messages during normal operation ([#1738](#1738)). * HTTP/2 and gRPC * Fix buffer data corruption regression introduced in 1.3.3 ([#1751](#1751)). Thanks to [@vadimi](https://github.com/vadimi), who contributed to this fix! * Kubernetes * Improve handling of Kubernetes API watch errors in `io.l5d.k8s` ([#1744](#1744), [#1752](#1752)). * Namerd * Fix `NoHostsAvailable` exception thrown by `io.l5d.mesh` when Namerd has namers configured with transformers ([#1729](#1729)). Signed-off-by: Eliza Weisman <[email protected]>
… our backlog relevant (linkerd#1734) Signed-off-by: Adam Christian <[email protected]>
When using the
io.l5d.path
identifier this these config valuesand a request url like
GET /mysvc?param=1¶m=2
Linkerd would drop the query parameters when sending the request for dtab delegation.This PR makes sure that query parameters are added to the dtab request url if the query parameters are available. This was tested with a local instance of Linkerd talking to a simple service that accepted requests with params.
fixes #1725