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

Kong does not expect matrix parameters when proxy by request path is used #1510

Closed
gabfssilva opened this issue Aug 17, 2016 · 4 comments
Closed

Comments

@gabfssilva
Copy link

gabfssilva commented Aug 17, 2016

Summary

It seems that Kong does not expect matrix parameters when we use proxy by request path. For example, if I do the following call, Kong says there's no api for this request:

GET /some/api;parameter=value

Trying make it work, I discovered that if I add a slash before the matrix parameters, it seems to work as expected:

GET /some/api/;parameter=value

I suppose Kong sees ";" as any other usual character, so, if you make a GET to /some/api;parameter=value it expects an api configured with a request path /some/api;parameter=value, and not just /some/api.

This is slightly annoying and does not match the spec, so, I'd hope it'd be fixed.

Steps To Reproduce

  1. Given a RESTful api that expects matrix parameters (e.g /some/api;parameter=value)
  2. Configure your api in kong proxied by request path and strip path request
  3. Try to access the api through Kong: https://kong.hostname/some/api;parameter=value
  4. Try again with the slash before the matrix parameters

Additional Details & Logs

  • Kong version (0.8.3)
  • Kong configuration (n/a)
  • Kong error logs (n/a)
  • Operating System (CentOS 7)
@gabriel-ozeas
Copy link

+1

@Tieske
Copy link
Member

Tieske commented Sep 1, 2016

referring to the last paragraph of 3.3

URI producing applications often use the reserved characters allowed in a segment to delimit scheme-specific or dereference-handler-specific subcomponents. For example, the semicolon (";") and equals ("=") reserved characters are often used to delimit parameters and parameter values applicable to that segment. The comma (",") reserved character is often used for similar purposes.

Then I don't think that this is a standard. Using the ';' character as a delimiter is an application choice, it's custom. It's just that the spec allows you to do it, but it might as well have been any other character 'a', 'z' or anything in between. So by definition it will be impossible to support all possible delimiter-scheme's people can come up with. Or am I missing something here?

@gabfssilva
Copy link
Author

I guess you're right. What about regular expressions? For instance, in this case, instead of configuring the request path to: /some/api, it could be like: /some/api((;)(.)*). I know Kong does not support it yet, but, it could be very useful and resolve other issues like this one: #677.

@thibaultcha
Copy link
Member

Regex support routing is on our roadmap for 0.10 or 0.11. Closing this in the meanwhile, I believe we've answered your concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants