squbs icon indicating copy to clipboard operation
squbs copied to clipboard

Webcontext can start with `/`

Open anilgursel opened this issue 9 years ago • 2 comments

The doc currently reads:

The web-context is a string that uniquely identifies the web context of a request to be dispatched to this service. It MUST NOT start with a / character. It can have / characters inside as segment separators in case of multi-segment contexts. And it is allowed to be "" for root context. If multiple services match the request, the longest context match takes precedence.

We should actually allow it to start with a /. Otherwise, it might get annoying while troubleshooting in development.

anilgursel avatar Dec 02 '16 15:12 anilgursel

Yes, this just bit me for about 30 minutes. I figured it out by changing the value until it worked. However, I did want to find out if it was documented. The inability to search the docs made that painful. I did find the relevant doc by doing a github search.

If you really don't want the leading '/', I'd consider throwing an exception or logging an error/warning.

crankydillo avatar Nov 30 '17 11:11 crankydillo

I agree, we should either throw an exception or should support /. We need to re-enable search, please see https://github.com/paypal/squbs/issues/534.

anilgursel avatar Nov 30 '17 14:11 anilgursel