Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

401 reposonse has wrong HTTP headers #35319

Closed
Labels
issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detail issue/not-a-bugThe reported issue is the intended behavior or the problem is not inside Gitea
@hramrach

Description

Description

wget -SO- https://demo.gitea.com/api/v1/user
--2025年08月19日 20:37:41-- https://demo.gitea.com/api/v1/user
Resolving demo.gitea.com (demo.gitea.com)... 52.40.189.212
Connecting to demo.gitea.com (demo.gitea.com)|52.40.189.212|:443... connected.
HTTP request sent, awaiting response... 
 HTTP/1.1 401 Unauthorized
 Alt-Svc: h3=":443"; ma=2592000
 Cache-Control: max-age=0, private, must-revalidate, no-transform
 Content-Length: 75
 Content-Type: application/json;charset=utf-8
 Date: 2025年8月19日 18:37:43 GMT
 Server: Caddy
 X-Content-Type-Options: nosniff
 X-Frame-Options: SAMEORIGIN
Username/Password Authentication Failed.

From what I can see the response sent to the user is neither 75 bytes long nor JSON. That makes the sent headers inconsistent with sent data

Gitea Version

1.25.0+dev-383-g463016b317

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detail issue/not-a-bugThe reported issue is the intended behavior or the problem is not inside Gitea

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /