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

Periods in query strings seem to throw routing off #1655

Closed
atrauzzi opened this issue Jul 29, 2017 · 7 comments
Closed

Periods in query strings seem to throw routing off #1655

atrauzzi opened this issue Jul 29, 2017 · 7 comments

Comments

@atrauzzi
Copy link
Contributor

atrauzzi commented Jul 29, 2017

http://localhost:8000/?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MDEzMDkyOTksInN1YiI6IjU5N2MxODliMzhmZTE5OTlhOTEzMjRiZCJ9.-YmntW5pTTmyke555OsOLJgeaPRHFIWrsjObsmZzfwQ

If I even just strip out the value from token and put any other value in, it's fine. As soon as I put a period . in there, it 404s. Something about having periods in query string variables seems to be messing things up.

@alampros
Copy link
Contributor

alampros commented Nov 9, 2017

It looks like this happens only in development mode, and is not limited to the query parameters - it affects the last path component as well:

http://localhost:8000/12.0/100/40.0
                        ^        ^
                      Fine     Breaks

alampros added a commit to alampros/gatsby that referenced this issue Nov 10, 2017
Allows for query parameters to passed on to static files.

Fix for gatsbyjs#1655
KyleAMathews pushed a commit that referenced this issue Nov 10, 2017
Allows for query parameters to passed on to static files.

Fix for #1655
@moisesv
Copy link

moisesv commented Nov 16, 2017

I keep getting the same error with the periods. I have tracked the problem down to:

/gatsby/src/commands/develop.js
line 120 in gatsby/commonad/develop.js

if (parsedPath.extname === `` || parsedPath.extname.startsWith(.html)) {

so using the example from above:
http://localhost:8000/?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MDEzMDkyOTksInN1YiI6IjU5N2MxODliMzhmZTE5OTlhOTEzMjRiZCJ9.-YmntW5pTTmyke555OsOLJgeaPRHFIWrsjObsmZzfwQ

which makes:
parsedPath.extname = '.-YmntW5pTTmyke555OsOLJgeaPRHFIWrsjObsmZzfwQ',

suggestions?

@KyleAMathews
Copy link
Contributor

@moisesv would love a PR fixing this!

@alampros
Copy link
Contributor

Did #2876 not fix this? Did you try it with gatsby@>1.9.108?

@moisesv
Copy link

moisesv commented Nov 21, 2017

Hi @alampros. I tried, did not fix it for me.

alampros added a commit to alampros/gatsby that referenced this issue Nov 21, 2017
KyleAMathews pushed a commit that referenced this issue Nov 28, 2017
@alampros
Copy link
Contributor

@moisesv - Does this still happen with [email protected]?

@KyleAMathews
Copy link
Contributor

This seems fixed. Open a new issue if that's not the case!

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

4 participants