Repository: prometheus/prometheus (language: go)

Issue:
Prometheus returns HTTP 500 "seeker can't seek" error on /favicon.ico
### What did you do?

1. Run Prometheus (I did `docker run -it -p 9090:9090 quay.io/prometheus/prometheus:latest`)
2. Go to http://localhost:9090/favicon.ico

### What did you expect to see?

Prometheus' favicon.

### What did you see instead? Under which circumstances?

A HTTP 500 response with Go's `seeker can't seek` error message.

### System information

Darwin 21.4.0 x86_64

### Prometheus version

```text
prometheus, version 2.35.0 (branch: HEAD, revision: 6656cd29fe6ac92bab91ecec0fe162ef0f187654)
  build user:       root@cf6852b14d68
  build date:       20220421-09:53:42
  go version:       go1.18.1
  platform:         linux/amd64
```

### Prometheus configuration file

_No response_

### Alertmanager version

_No response_

### Alertmanager configuration file

_No response_

### Logs

_None relevant to the issue (not even with `--log.level=debug`)._



Discussion / hints:
This `HTTP 500` on `/favicon.ico` seems to appear only when running Prometheus using docker. I have a `2.35.0` version running as a service and I get `HTTP 200` and the actual image when I'm browsing `/favicon.ico`.
Same issue here
the issue occurred also when using the PromQL editor. The UI cannot get the icon for the editor. There is a `HTTP 500 Internal Server Error` for http://localhost:9090/static/media/codicon.b3726f0165bf67ac6849.ttf.

And yes it's only in Docker. When we are using the binary directly, the issue doesn't happen.

issue wasn't there in 2.34. I'm looking about what changed between 2.34 and 2.35
It's not only in docker, it's when building with promu crossbuild.
that's weird @roidelapluie. I downloaded the last archive and run the binary and I don't see the issue like @fpapadamis said it too.
```
tar xvf prometheus-2.36.1.linux-amd64.tar.gz
cd prometheus-2.36.1.linux-amd64/
./prometheus 
```

then

```
curl 127.0.0.1:9090/favicon.ico
seeker can't seek
```

```bash
tar xvf prometheus-2.36.1.darwin-amd64.tar.gz
cd prometheus-2.36.1.darwin-amd64/
./prometheus
```

```
curl 127.0.0.1:9090/favicon.ico --output favicon.ico
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15086  100 15086    0     0   983k      0 --:--:-- --:--:-- --:--:-- 4910k
```

no issue in darwin arch.

Perhaps the issue is more on linux actually
My initial thinking: https://github.com/prometheus/common/blob/627089d3a7af73be778847aa577192b937b8d89a/server/static_file_server.go#L21

We need more extensions here. If the extension is not known, go http will seek the file to know the mimetype, which is not possible.
https://github.com/prometheus/common/pull/385
After some testing, I confirm that prometheus/common#385 fixes the issue.
cool, thank you @roidelapluie. I commented the PR in order to add more mimeTypes support.
https://github.com/prometheus/prometheus/pull/10879

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9215f67bc7c..6e6c024cc69 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Changelog
 
+## 2.36.2 / 2022-06-20
+
+* [BUGFIX] Fix serving of static assets like fonts and favicon. #10888
+
 ## 2.36.1 / 2022-06-09
 
 * [BUGFIX] promtool: Add --lint-fatal option #10840
diff --git a/VERSION b/VERSION
index 089d1d4e029..38bcf609c14 100644
--- a/VERSION
+++ b/VERSION
@@ -1,1 +1,1 @@
-2.36.1
+2.36.2
diff --git a/go.mod b/go.mod
index a5a13b7aaec..4702cf70759 100644
--- a/go.mod
+++ b/go.mod
@@ -41,8 +41,8 @@ require (
 	github.com/prometheus/alertmanager v0.24.0
 	github.com/prometheus/client_golang v1.12.2
 	github.com/prometheus/client_model v0.2.0
-	github.com/prometheus/common v0.34.0
-	github.com/prometheus/common/assets v0.1.0
+	github.com/prometheus/common v0.35.0
+	github.com/prometheus/common/assets v0.2.0
 	github.com/prometheus/common/sigv4 v0.1.0
 	github.com/prometheus/exporter-toolkit v0.7.1
 	github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9
diff --git a/go.sum b/go.sum
index 6b939336f38..c78c88990c8 100644
--- a/go.sum
+++ b/go.sum
@@ -741,10 +741,10 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8
 github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
 github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
 github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
-github.com/prometheus/common v0.34.0 h1:RBmGO9d/FVjqHT0yUGQwBJhkwKV+wPCn7KGpvfab0uE=
-github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE=
-github.com/prometheus/common/assets v0.1.0 h1:8WlWPDRjbfff4FWCBjaUF0NEIgDD2Mv2anoKfwG+Ums=
-github.com/prometheus/common/assets v0.1.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI=
+github.com/prometheus/common v0.35.0 h1:Eyr+Pw2VymWejHqCugNaQXkAi6KayVNxaHeu6khmFBE=
+github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
+github.com/prometheus/common/assets v0.2.0 h1:0P5OrzoHrYBOSM1OigWL3mY8ZvV2N4zIE/5AahrSrfM=
+github.com/prometheus/common/assets v0.2.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI=
 github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4=
 github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI=
 github.com/prometheus/exporter-toolkit v0.7.1 h1:c6RXaK8xBVercEeUQ4tRNL8UGWzDHfvj9dseo1FcK1Y=


Test patch: