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

Server returns 404 for paths that contain spaces #5064

Closed
maximedupre opened this issue Feb 27, 2017 · 12 comments
Closed

Server returns 404 for paths that contain spaces #5064

maximedupre opened this issue Feb 27, 2017 · 12 comments
Labels
needs: investigation Requires some digging to determine if action is needed

Comments

@maximedupre
Copy link

I'm stuck at v1.0.0-beta.31 because with every version after that (including v1.0.0-rc.0), the server returns 404 when making a request to a path that contains spaces, for example: "http://localhost:4200/app/resources/drumkits/acoustik%20GM/Acoustic%20Bass%20Drum.wav"

I'm on macOS v10.12.3 and node v6.9.5.

@maximedupre maximedupre changed the title server returns 404 for paths that contain spaces Server returns 404 for paths that contain spaces Feb 27, 2017
@Zvenigora
Copy link

I have just migrated from v1.0.0-beta.31 to v1.0.0-rc.0 and found out that the Live Development Server needs to add "src" into the URL. Instead of "http://localhost:4200/app/..." it should be "http://localhost:4200/src/app/...".
Please revert.

@Daedalon
Copy link

Daedalon commented Mar 7, 2017

Last working: 1.0.0-beta.31

Broken: 1.0.0-beta.32, rc.0 and rc.1.

Tested: Windows 7 and both Node 6.9 and 7.7.

Not among the known breaking changes.

Looking for a way to revert global install to 1.0.0-beta.31 in order to create new projects where assets work.

@sumitarora @maximedupre The issue title could be changed to "Server returns 404 for all asset paths without src/".

@maximedupre
Copy link
Author

The issue title could be changed to "Server returns 404 for all asset paths without src/".

I'm not sure this accurate, because if I just change the name of my file to contain no spaces, and link to it without "src/", it works.

@Daedalon
Copy link

Daedalon commented Mar 9, 2017

if I just change the name of my file to contain no spaces, and link to it without "src/", it works.

Perhaps we're seeing two separate issues here. My asset URLs fail without any spaces in 1.0.0-beta.32 through to to 1.0.0-rc.1:

http://localhost:4200/styles.css doesn't work, redirects to server root
http://localhost:4200/src/styles.css works.

@tomerkon
Copy link

Same problem here, resource name with space, error 404. Windows 7, node 7.7.2, npm 4.1.2, @angular/cli: 1.0.0-rc.1

@filipesilva
Copy link
Contributor

@sumitarora I think you were investigating this issue, or a similar one. Did you find a solution?

@filipesilva filipesilva added the needs: investigation Requires some digging to determine if action is needed label Mar 14, 2017
@devhammer
Copy link

Like @Daedalon, I seem to have run into the issue with styles.css. No space in the filename here, but styles.css was returning a 404 when specifying just styles.css as the href in the link tag, in index,html, but prefixing it with src/ resolved the issue.

FWIW, the ToH tutorial router section directs users to add styles.css to index.html using:

<link rel="stylesheet" href="styles.css">

which doesn't appear to work for CLI-generated apps.

@maximedupre
Copy link
Author

maximedupre commented Apr 18, 2017

At least for the issue this ticket was created for, it is fixed in v1.0.0.

Edit: Nvm...

@Daedalon
Copy link

@maximedupre The issues I experienced with styles.css etc. were resolved in 1.0.

@maximedupre
Copy link
Author

@Daedalon We were having different issues though. Too bad mine wasn't also fixed in 1.0.

@maximedupre
Copy link
Author

Fixed in 1.0.3

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: investigation Requires some digging to determine if action is needed
Projects
None yet
Development

No branches or pull requests

7 participants