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

X-Gitea-Debug header being sent 3 times #23308

Closed
stuzer05 opened this issue Mar 5, 2023 · 3 comments · Fixed by #23361
Closed

X-Gitea-Debug header being sent 3 times #23308

stuzer05 opened this issue Mar 5, 2023 · 3 comments · Fixed by #23361
Labels

Comments

@stuzer05
Copy link
Contributor

stuzer05 commented Mar 5, 2023

Description

On view commit diff page, commit file request X-Gitea-Debug header is duplicated 3 times

Gitea Version

latest master

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

No response

Operating System

No response

How are you running Gitea?

Latest master, make watch-backend, make watch-frontend

Database

None

@wxiaoguang
Copy link
Contributor

It must be caused by repeated/duplicate calls to httpcache.AddCacheControlToHeader. That's not ideal, but luckily there is not side effect at the moment ....

@stuzer05
Copy link
Contributor Author

stuzer05 commented Mar 5, 2023

Is there a reason to call httpcache.AddCacheControlToHeader 3 times? Looking on code, it seems it doesn't do anything different with each call

@wxiaoguang
Copy link
Contributor

Of course no reason .... 😂 so that's not ideal.

techknowlogick added a commit that referenced this issue Mar 8, 2023
Instead of adding it

# Before
On the raw commit page:

![image](https://user-images.githubusercontent.com/20454870/223470744-cdf11898-e023-4198-8c8b-c294e5d78b73.png)

# After

![image](https://user-images.githubusercontent.com/20454870/223470596-af898d66-bd5b-4ddb-b220-ceb1f149bfec.png)

Fixes #23308

---------

Signed-off-by: Yarden Shoham <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: John Olheiser <[email protected]>
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Mar 8, 2023
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants