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

Incorrect HTTP code in places. #404

Closed
mitchellurgero opened this issue Jan 19, 2018 · 9 comments · Fixed by #408
Closed

Incorrect HTTP code in places. #404

mitchellurgero opened this issue Jan 19, 2018 · 9 comments · Fixed by #408
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@mitchellurgero
Copy link

Is this a bug report?

yes.

Have you read the Contributing Guidelines?

Yes.

Environment

Ubuntu 16.04, Node 8.9, Lastest (As of this post) Docusaurus from npm.

Steps to Reproduce

Viewing pages that do not exist return error code 200, but should be returning 404.

Expected Behavior

Return HTTP code 404.

Actual Behavior

Returns HTTP code 200.
image

Reproducible Demo

Can be reproduced literally on any docusaurus installation: https://urgero.org

@JoelMarcey
Copy link
Contributor

@mitchellurgero Hi. Thanks for filing this issue.

Interesting...

I went to your website: https://urgero.org (thanks for using Docusaurus, btw).

I tried https://urgero.org/opos/index.html -- and I got a 404.

I tried https://urgero.org/opos - and I get what you pasted in your screenshot.

I wonder if this has to do more with express.js than the Docusaurus core? Needs investigating.

@JoelMarcey
Copy link
Contributor

Probably have to do some additional routes or checking in server.js.

JoelMarcey added a commit to JoelMarcey/Docusaurus that referenced this issue Jan 22, 2018
Also simplified the logic a bit to reduce duplication

Closes facebook#404
@JoelMarcey
Copy link
Contributor

@mitchellurgero I submitted #408 to fix this.

Btw, are you using the local Docusaurus server (server.js) to run your site?

@JoelMarcey JoelMarcey added bug An error in the Docusaurus core causing instability or issues with its execution fixready labels Jan 22, 2018
@mitchellurgero
Copy link
Author

Hey @JoelMarcey ! Thanks for fixing so quickly! Idk what you mean by that. I am using the latest package from npm (npm install Docusaurus-init)

@JoelMarcey
Copy link
Contributor

@mitchellurgero Sorry for not being clear -- what I am asking is your website https://urgero.org running on GitHub Pages (e.g., did you use docusaurus-publish)? Or is it running somewhere else using the built-in Docusaurus server?

@mitchellurgero
Copy link
Author

I am using docusaurus via it's server.js (using nodeJS and apache2 to proxy.

@JoelMarcey
Copy link
Contributor

Perfect. That makes sense, because you would only get those errors running the Docusaurus server. GitHub Pages would give you different messages, etc. on those routes.

@mitchellurgero
Copy link
Author

When will this be pushed into release so I can update my site?

@mitchellurgero
Copy link
Author

Also is there a way to update page linking / document linking (Like in the sidebar) without restarting nodejs service?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants