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

valid app URL containing a period results in "Cannot GET" error #2168

Closed
chalin opened this issue Sep 16, 2016 · 7 comments · Fixed by #2535
Closed

valid app URL containing a period results in "Cannot GET" error #2168

chalin opened this issue Sep 16, 2016 · 7 comments · Fixed by #2535
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix

Comments

@chalin
Copy link

chalin commented Sep 16, 2016

The ng2.io app has pages at URLs like

http://localhost:4200/docs/ts/latest/quickstart.html

(note the .html suffix). I can navigate by clicking links in the app, but if I copy-paste a valid app URL (like the previous one), I get:

Cannot GET /docs/ts/latest/quickstart.html

And if we deploy to firebase, it all works fine. How can we coerce ng serve into playing nice?

  1. OS? OSX 10.11.6
  2. Versions.
    angular-cli: 1.0.0-beta.14
    node: 6.5.0
    os: darwin x64

cc @filipesilva @ericjim

@filipesilva filipesilva added type: bug/fix command: serve P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Sep 16, 2016
@filipesilva filipesilva self-assigned this Sep 16, 2016
@chalin
Copy link
Author

chalin commented Sep 30, 2016

ping

@chalin chalin changed the title valid app URL (ending with .html) results in "Cannot GET" error valid app URL containing a period results in "Cannot GET" error Oct 3, 2016
@chalin
Copy link
Author

chalin commented Oct 3, 2016

Actually, a period anywhere in the URL causes this problem (Dart API URLs contain periods because of periods in library names like angular2.common).

@naomiblack

@denkomanceski
Copy link

+1

@denkomanceski
Copy link

One way how I resolved this temporary is stop using html5 style and use hashstrategy instead

@filipesilva
Copy link
Contributor

As context, there seems to be a solution in webpack/webpack-dev-server#303 but it requires rewriting on a case-by-case basis, which just wouldn't work for the CLI.

@filipesilva
Copy link
Contributor

filipesilva commented Oct 5, 2016

I've tested it and this option fixes our issue bripkens/connect-history-api-fallback@ee86111

But it's part of 1.3.0 of connect-history-api-fallback which is not yet required by webpack-dev-server: https://github.com/webpack/webpack-dev-server/blob/master/package.json#L11 .

It should just work due to semver though... I submitted a PR to make it explicit: webpack/webpack-dev-server#638

filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 5, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 5, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 15, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 15, 2016
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 15, 2016
Brocco pushed a commit that referenced this issue Oct 19, 2016
kieronqtran pushed a commit to kieronqtran/angular-cli that referenced this issue Oct 21, 2016
texel pushed a commit to splice/angular-cli that referenced this issue Nov 3, 2016
@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants