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

Handler prefix does not allow grouping expressions #50

Open
aronatkins opened this issue Oct 19, 2016 · 0 comments
Open

Handler prefix does not allow grouping expressions #50

aronatkins opened this issue Oct 19, 2016 · 0 comments

Comments

@aronatkins
Copy link
Collaborator

Creating a sockjs handler with a prefix that involves a regular expression group breaks parseSessionID because it uses constant match offsets.

It feels like there are two options:

  1. Trim the prefix-match from the incoming url.Path before attempting the session match.
  2. Take advantage of the named matches (assuming the user-provided prefix does not include the same names).

In my situation, I have two prefix paths that I want to be treated equivalently. Let's call them:

  /foo/bar
  /foo

I am attempting to adjust the client, but that's a little out of my control; I originally tried to work around this situation with:

sockjs.NewHandler(
  "/foo(/bar)?",
  ...
)
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

1 participant