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

Support for template routes with encoded separator in RSocketRequester #23310

Closed
rwinch opened this issue Jul 17, 2019 · 1 comment
Closed

Support for template routes with encoded separator in RSocketRequester #23310

rwinch opened this issue Jul 17, 2019 · 1 comment
Assignees
Labels
in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Milestone

Comments

@rwinch
Copy link
Member

rwinch commented Jul 17, 2019

Affects: 5.2.0.BUILD-SNAPSHOT

RSocketRequester allows a route to be provided. It would be nice if there were a simple way to perform encoding of the route. For example, if a route were foo.{id} and id contains a . then it would not work. It would be nice if there were a simple mechanism to encode the route.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 17, 2019
@rstoyanchev rstoyanchev self-assigned this Jul 19, 2019
@rstoyanchev rstoyanchev added in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jul 19, 2019
@rstoyanchev rstoyanchev added this to the 5.2 RC1 milestone Jul 19, 2019
@rstoyanchev rstoyanchev changed the title Add Encoding Support to RSocketRequester Support for template routes with encoded separator in RSocketRequester Jul 22, 2019
pull bot pushed a commit to pierDipi/spring-framework that referenced this issue Jul 22, 2019
To make the switching of separators complete, it is also important to
know whether the decoding of path segment values and the parsing of
path param should be done as those are applied transparently.

This commit replaces the recently added separator argument to
PathContainer.parsePath with an Options type with two predefined
constants. One for HTTP URLs with automatic decoding and parsing of
path params, and another for "." separated message routes without
decoding except for encoded sequences of the separator itself.

See spring-projectsgh-23310
@rstoyanchev
Copy link
Contributor

I've made two updates:

  1. For the responder side PathPattern now supports HTTP ("/" separator with decoding of path segment values and parsing of path params) vs Message Route style parsing ("." separator with no decoding and no parsing of path params). The latter does decode encoded sequences for the separator char and is enabled with the default constructor of PathPatternRouteMatcher.
  2. For the requester side, RSocketRequester now supports route variables to be expanded into the route, also replacing any "." with "%2E".

bclozel added a commit to spring-projects/spring-boot that referenced this issue Jul 22, 2019
This commit updates the `RouteMatcher` configuration after the latest
Spring Framework changes. The default route matcher implementation based
on the `PathPattern` infrastructure is now tailored for the messaging
use case (path separator, path encoding options and trailing separator).

See spring-projects/spring-framework#23310
rstoyanchev added a commit that referenced this issue Jul 22, 2019
rwinch added a commit to rwinch/spring-flights that referenced this issue Jul 23, 2019
bclozel pushed a commit to bclozel/spring-flights that referenced this issue Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants