dotnet / dotnet/aspnetcore

OutputCaching not returning API version headers

Open
#45,016 3 comments 0 reactions 0 assignees View on GitHub
area-middleware area-networking feature-output-caching
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

When returning an item from the cache, the response headers are different based on cached vs non-cache. Specifically, the "api-supported" header is missing.

// First call - not cached
api-supported-versions: 1.0
content-type: application/json; charset=utf-8
date: Fri,11 Nov 2022 02:18:26 GMT
server: Kestrel

// Second call - item cached
age: 22
content-length: 39
content-type: application/json; charset=utf-8
date: Fri,11 Nov 2022 02:18:26 GMT
server: Kestrel

### Expected Behavior

All relevant headers that the client might need to inspect are present. in this case, the "api-version"

### Steps To Reproduce

_No response_

### Exceptions (if any)

_No response_

### .NET Version

7.0.100

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.