Skip to content

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

Closed
@dakira

Description

@dakira
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions