Skip to content

Content-Disposition missing when hitting cache #194

Description

@jarkkojarvinen

I have Web API which returns file resources by id and file can be renamed by query string parameter by setting it to content-disposition.
I just added CacheOutput to API and noticed that when called /api/{fileID}?filename=somefile.dat then response headers look fine like:

HTTP/1.1 200 OK
Cache-Control: max-age=18000
Transfer-Encoding: chunked
Content-Type: application/octet-stream
ETag: "e7cb87a4-54cd-4665-9170-d780e2f7d83d"
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Content-Disposition: attachment; filename=somefile.dat
Date: Fri, 06 Jan 2017 11:55:54 GMT

But when I call same url again then file will be returned from cache. On this time response headers doesn't contain Content-Disposition which affects that filename is {fileID} and that is not what I need:

HTTP/1.1 200 OK
Cache-Control: max-age=18000
Content-Length: 294912
Content-Type: application/octet-stream
ETag: "e7cb87a4-54cd-4665-9170-d780e2f7d83d"
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
Date: Fri, 06 Jan 2017 11:56:13 GMT

Can this be fixed somehow e.g. configuration etc?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions