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

Finish case sensitivity settings in sub routers #17

Open
jthomerson opened this issue Feb 26, 2019 · 1 comment
Open

Finish case sensitivity settings in sub routers #17

jthomerson opened this issue Feb 26, 2019 · 1 comment
Assignees
Milestone

Comments

@jthomerson
Copy link
Member

See

// TODO: case sensitivity settings (strict and end need to remain false here):

@jthomerson jthomerson added this to the 1.0.0 milestone Feb 26, 2019
@yokuze
Copy link
Contributor

yokuze commented Feb 28, 2019

It turns out that, in Express, route settings are not inherited from parent to child routers. In this example:

const router1 = express.Router({ caseSensitive: true }),
      router1 = express.Router();

router2.get('/World', (req, resp, next) => { console.log('uppercase /World'); next(); });
router2.get('/world', (req, resp, next) => { console.log('lowercase /world'); next(); });
router2.get('*', (req, resp) => { resp.send('world'); });

router1.use('/hello', router2);
app.use('/', router1);

router2 does not inherit router1's case sensitivity settings.

We should adjust our current behavior to avoid inheriting router settings.

yokuze added a commit to yokuze/lambda-express that referenced this issue Mar 1, 2019
…e#17)

When a sub-router was mounted to a given path, the
SubRouterProcessorChain did not respect the router's case-sensitivity
settings. Additionally, sub-routers should NOT inherit their
case-sensitivity settings from its parent router.
yokuze added a commit to yokuze/lambda-express that referenced this issue Mar 1, 2019
…e#17)

When a sub-router was mounted to a given path, the
SubRouterProcessorChain did not respect the router's case-sensitivity
settings. Additionally, sub-routers should NOT inherit their
case-sensitivity settings from their parent router.
yokuze added a commit to yokuze/lambda-express that referenced this issue Mar 1, 2019
…e#17)

When a sub-router was mounted to a given path, the
SubRouterProcessorChain did not respect the router's case-sensitivity
settings. Additionally, sub-routers should NOT inherit their
case-sensitivity settings from their parent router.
yokuze added a commit to yokuze/lambda-express that referenced this issue Mar 15, 2019
…e#17)

When a sub-router was mounted to a given path, the
SubRouterProcessorChain did not respect the router's case-sensitivity
settings. Additionally, sub-routers should NOT inherit their
case-sensitivity settings from their parent router.
yokuze added a commit to yokuze/lambda-express that referenced this issue Mar 18, 2019
…e#17)

When a sub-router was mounted to a given path, the
SubRouterProcessorChain did not respect the router's case-sensitivity
settings. Additionally, sub-routers should NOT inherit their
case-sensitivity settings from their parent router.
jthomerson added a commit that referenced this issue Mar 24, 2019
fix: case-sensitive routing for sub-router mounting points (#17)
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