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

404 response for HEAD request with no Accept: #163

Closed
nico-izo opened this issue Jun 26, 2015 · 4 comments
Closed

404 response for HEAD request with no Accept: #163

nico-izo opened this issue Jun 26, 2015 · 4 comments
Labels
A-backend ⚙️ C-bug 🐞 Category: unintended, undesired behavior

Comments

@nico-izo
Copy link

Steps to reproduce:

$ curl -I https://crates.io/
HTTP/1.1 404 Not Found
<...>
Content-Type: application/json; charset=utf-8

With Accept: text/html everything is okay:

$ curl -H "Accept: text/html" -I https://crates.io/
HTTP/1.1 200 OK
<...>
Content-Type: text/html

@alexcrichton
Copy link
Member

Unfortunately had to revert #464

@alexcrichton alexcrichton reopened this Nov 12, 2016
@tamird
Copy link
Contributor

tamird commented Nov 12, 2016

Seems like we need separate treatment of headers by route.

On Nov 12, 2016 13:38, "Alex Crichton" [email protected] wrote:

Reopened #163 #163.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#163 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABdsPNE0kBnS7eJWd4zw4NAPQRdVyDAEks5q9gePgaJpZM4FMkiJ
.

@alexcrichton
Copy link
Member

Yeah I'd be down for that!

@carols10cents carols10cents added A-API C-bug 🐞 Category: unintended, undesired behavior labels Dec 15, 2016
@carols10cents carols10cents changed the title 404 responce for HEAD request with no Accept: 404 response for HEAD request with no Accept: May 12, 2017
jtgeibel added a commit to jtgeibel/crates.io that referenced this issue Jul 25, 2019
The backend no longer checks for an "html" in the `Accept` header.
With the exception of 3 session related routes, all paths not starting
with "/api" will be redirected to the static Ember bootstrap page.

As a result of this change all non-api requests that don't contain
"html" in the `Accept` header will now unconditionally return `200`,
rather than `404`.  In a sense, this expands the scope of rust-lang#556 to all
requests, not just those that set the header.  It also inverts the
problem described in rust-lang#788, effectively turning it into a duplicate
of rust-lang#556.

Fixes: rust-lang#163
@carols10cents
Copy link
Member

Closing as a duplicate of #788.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants