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

Gitea instance returns HTTP status 404 when only asking for headers #969

Closed
2 of 6 tasks
dakira opened this issue Feb 18, 2017 · 3 comments
Closed
2 of 6 tasks

Gitea instance returns HTTP status 404 when only asking for headers #969

dakira opened this issue Feb 18, 2017 · 3 comments
Labels
type/enhancement An improvement of existing functionality
Milestone

Comments

@dakira
Copy link
Contributor

dakira commented Feb 18, 2017

  • Gitea version (or commit ref): 1.0.1 (all Gitea and Gogs versions are affected)
  • Git version: 1.9.1
  • Operating system: Ubuntu 14.04 through 16.10
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (see below)
    • No
    • Not relevant

Description

When requesting headers only, from a Gitea-server, it wrongly returns HTTP status 404.

Expected: HTTP 200.

~ curl -I https://try.gitea.io
HTTP/1.1 404 Not Found
Content-Type: text/html; charset=UTF-8
Date: Sat, 18 Feb 2017 12:22:11 GMT
Set-Cookie: lang=en-US; Path=/; Max-Age=2147483647
Set-Cookie: i_like_gitea=003f17e962323116; Path=/; HttpOnly
Set-Cookie: _csrf=-GQNJ7f6zhbIHnvi9zdMfG1sha86MTQ4NzQyMDUzMDk5NjQ4MTc4OA%3D%3D; Path=/; Expires=Sun, 19 Feb 2017 12:22:10 GMT; HttpOnly
X-Frame-Options: SAMEORIGIN

This is not expected behavior for a site that is available. Uptime-Monitors will show gitea instances as down because they usually only request the headers.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@lunny lunny added this to the 1.2.0 milestone Feb 18, 2017
@lunny lunny added the type/enhancement An improvement of existing functionality label Feb 18, 2017
@Fastidious
Copy link

I think http://try.gitea.io is having problems. That might be the reason of this.

@dakira
Copy link
Contributor Author

dakira commented Feb 20, 2017

For reference, this was already discussed for Gogs: gogs/gogs#2857

@dakira
Copy link
Contributor Author

dakira commented Feb 20, 2017

This route should help health checks pass for Gitea.

m.Head("/", func() {
    return "Operating"
})

lunny added a commit to lunny/gitea that referenced this issue Apr 20, 2017
@lunny lunny closed this as completed in 4207278 Apr 20, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants