Giter VIP home page Giter VIP logo

Comments (5)

aliostad avatar aliostad commented on May 26, 2024

This behaviour is correct. Please see Issue #36.

from cachecow.

melcloud avatar melcloud commented on May 26, 2024

Hi Ali,

In that case, should we just remove them? Because according to RFC2616, Section 10.3.5, Cache-Control, Expires and Pragma should not be sent back:

The response MUST include the following header fields:

  • Date, unless its omission is required by section 14.18.1 (This is correct)
  • ETag and/or Content-Location, if the header would have been sent in a 200 response to the same request (this is correct)
  • Expires, Cache-Control, and/or Vary, if the field-value might differ from that sent in any previous response for the same variant (We should not send them back as they haven't changed).

Thanks for your patience.

from cachecow.

melcloud avatar melcloud commented on May 26, 2024

And if you look at http://stackoverflow.com/questions/1587667/should-http-304-not-modified-responses-contain-cache-control-headers/4393499#4393499. There is an answer by Mark Nottingham said:

HTTPbis updates RFC2616 to say:

A 304 response MUST include a Date header field (Section 9.3 of [Part1]) unless its omission is required by Section 9.3.1 of [Part1]. If a 200 response to the same request would have included any of the header fields Cache-Control, Content-Location, ETag, Expires, Last-Modified, or Vary, then those same header fields MUST be sent in a 304 response.

I think it is a safe option to send the original headers back.

Thanks

from cachecow.

aliostad avatar aliostad commented on May 26, 2024

Thanks @melcloud I will take this one up to fix.

from cachecow.

aliostad avatar aliostad commented on May 26, 2024

It is actually ASP.NET Web API adding these headers not me.

from cachecow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.