10000 Don't send an empty HTTP header for /favicon.ico by noselasd · Pull Request #1101 · prometheus/client_python · GitHub
[go: up one dir, main page]

Skip to content

Don't send an empty HTTP header for /favicon.ico #1101

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

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

noselasd
Copy link
Contributor
@noselasd noselasd commented Apr 7, 2025

Requesting /favicon.ico sends an empty HTTP header:

*   Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /favicon.ico HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.88.1
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Date: Mon, 07 Apr 2025 14:24:35 GMT
< Server: WSGIServer/0.2 CPython/3.12.9
< :
< Content-Length: 0
<
* Closing connection 0

The empty header right before Content-Length breaks strict proxies/middleware.

This breaks strict middleware..

Signed-off-by: Nils O. Selåsdal <nos@utel.tech>
@noselasd noselasd force-pushed the fix_favicon_http_headers branch from 6af5644 to be40255 Compare April 7, 2025 14:29
@csmarchbanks
Copy link
Member

Thanks!

@csmarchbanks csmarchbanks merged commit e3902ea into prometheus:master Apr 10, 2025
11 checks passed
@gravelg
Copy link
gravelg commented May 14, 2025

Hi @csmarchbanks ! How can we request a release including this bugfix? We just ran into the issue and would love if we could take advantage of the fixed code

@csmarchbanks
Copy link
Member

Sorry about that, I thought I had done one, just released it in v0.22.0

@gravelg
Copy link
gravelg commented May 18, 2025

Thank you so much! Really appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0