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

Trailing slash behavior is not consistent between Endpoints v1 and Endpoints v2 #142

Open
y10h opened this issue Mar 1, 2018 · 0 comments
Assignees

Comments

@y10h
Copy link
Contributor

y10h commented Mar 1, 2018

Endpoints v1 (part of the appengine SDK) and Endpoints v2 (this library) don't work the same way with trailing slashes.

Endpoints v1:

  • endpoint that doesn't have trailing slash in definition (example: path = 'path/without-trailing-slash'):
    • GET with trailing slash 'path/without-trailing-slash/' — OK
    • GET without trailing slash 'path/without-trailing-slash' — OK
  • endpoint that does have trailing slash in definition (example: path= 'path/with-trailing-slash/'):
    • GET with trailing slash 'path/with-trailing-slash/' — OK
    • GET without trailing slash 'path/with-trailing-slash' — OK
      Endpoints v2:
  • endpoint that doesn't have trailing slash in definition (example: path = 'path/without-trailing-slash'):
    • GET with trailing slash 'path/without-trailing-slash/' — OK
    • GET without trailing slash 'path/without-trailing-slash' — OK
  • endpoint that does have trailing slash in definition (example: path= 'path/with-trailing-slash/'):
    • GET with trailing slash 'path/with-trailing-slash/' — OK
    • GET without trailing slash 'path/with-trailing-slash' — FAIL (404 Not found)

Please correct the implementation of Endpoints v2 to match the behavior of Endpoints v1.

@inklesspen inklesspen self-assigned this Mar 1, 2018
@inklesspen inklesspen reopened this Mar 13, 2018
inklesspen added a commit that referenced this issue Mar 13, 2018
Squashed commit of the following:

commit 7fd92d3
Author: Rose Davidson <[email protected]>
Date:   Tue Mar 13 11:35:36 2018 -0700

    Revert "Make trailing slash truly optional. (#142) (#143)"

    This reverts commit 818c925.

    Reverted because the author told me he'd found this produces parsing issues:

    > It seems now patterns like /prefix/{var1}/{var2}/ and /prefix/{var1}/ are mixed up.

    May reconsider this approach later.
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

2 participants