Repository: prometheus/prometheus (language: go)

Issue:
exemplar storage doesn't work for v2.40.0-rc.0
### What did you do?

I test native histograms with [v2.40.0-rc.0](https://hub.docker.com/layers/prom/prometheus/v2.40.0-rc.0/images/sha256-3fe0d56a6707a36b44a2558c7ec59c36e0ac66fb49a33a65ae777a2b3df6c769?context=explore)  docker image,  scrape [client_golang random app](https://github.com/prometheus/client_golang/blob/main/examples/random/main.go) with `main` branch and `5f202eefdb5dcb9b5b26d4d7c3351d1e5a0d9bc7 `  hash.

I run two Prometheus instances, one start with native histograms enabled, another disabled. all of them scrape the random app's metrics.

The docker compose yaml like:

```
 prometheus:
    image: prom/prometheus:v2.40.0-rc.0
    command:
      - --config.file=/etc/prometheus/prometheus.yml
      - --log.level=error
      - --storage.tsdb.path=/prometheus
      - --web.console.libraries=/usr/share/prometheus/console_libraries
      - --web.console.templates=/usr/share/prometheus/consoles
      - --enable-feature=native-histograms
      - --enable-feature=exemplar-storage
    volumes:
      - ./config/prometheus.yml:/etc/prometheus/prometheus.yml
      - prometheus-1-data:/prometheus
    ports:
      - 9090:9090
  prometheus2:
    image: prom/prometheus:v2.40.0-rc.0
    command:
      - --config.file=/etc/prometheus/prometheus.yml
      - --log.level=error
      - --storage.tsdb.path=/prometheus
      - --web.console.libraries=/usr/share/prometheus/console_libraries
      - --web.console.templates=/usr/share/prometheus/consoles
      - --enable-feature=exemplar-storage
    volumes:
      - ./config/prometheus.yml:/etc/prometheus/prometheus.yml
      - prometheus-2-data:/prometheus
    ports:
      - 9091:9090
  native-demo:
    image: client_golang:v0.1
    ports:
      - 8080:8080
``` 

When run some times, check the two Prometheus's histograms  and exemplar data, I find only the native histograms enabled instance works well with exemplar.


### What did you expect to see?

Exemplar storage works well with prometheus:v2.40.0-rc.0 even if disabled native histograms, the Graph dashbord will show exempalr data when click `Show Exemplars` button.

### What did you see instead? Under which circumstances?

The Graph dashbord doesn't show  any exempalr data when click `Show Exemplars` button.

### System information

docker image prometheus:v2.40.0-rc.0 

### Prometheus version

_No response_

### Prometheus configuration file

_No response_

### Alertmanager version

_No response_

### Alertmanager configuration file

_No response_

### Logs

_No response_


Discussion / hints:
Thanks for the comprehensive report. This is interesting. I'll have a look ASAP.

Fix patch:
diff --git a/scrape/scrape.go b/scrape/scrape.go
index 8a664bf7347..0421b51cb85 100644
--- a/scrape/scrape.go
+++ b/scrape/scrape.go
@@ -773,8 +773,8 @@ type targetScraper struct {
 var errBodySizeLimit = errors.New("body size limit exceeded")
 
 const (
-	scrapeAcceptHeader             = `encoding=delimited,application/openmetrics-text;version=1.0.0;q=0.75,text/plain;version=0.0.4;q=0.5,*/*;q=0.1`
-	scrapeAcceptHeaderWithProtobuf = `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited,application/openmetrics-text;version=1.0.0;q=0.75,text/plain;version=0.0.4;q=0.5,*/*;q=0.1`
+	scrapeAcceptHeader             = `application/openmetrics-text;version=1.0.0;q=0.75,application/openmetrics-text;q=0.6,text/plain;version=0.0.4;q=0.5,*/*;q=0.1`
+	scrapeAcceptHeaderWithProtobuf = `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited,application/openmetrics-text;version=1.0.0;q=0.75,application/openmetrics-text;q=0.6,text/plain;version=0.0.4;q=0.5,*/*;q=0.1`
 )
 
 var UserAgent = fmt.Sprintf("Prometheus/%s", version.Version)


Test patch: