Skip to content

Commit

Permalink
[#569] Fix Cache-Control-header: Don't add 'no-cache' if 'expires' is…
Browse files Browse the repository at this point in the history
… already present
  • Loading branch information
jxtps authored and mbknor committed Jun 10, 2011
1 parent c484ba4 commit 3e42011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/src/play/server/PlayHandler.java
Expand Up @@ -296,7 +296,7 @@ protected static void addToResponse(Response response, HttpResponse nettyRespons
nettyResponse.addHeader(SET_COOKIE, encoder.encode());
}

if (!response.headers.containsKey(CACHE_CONTROL)) {
if (!response.headers.containsKey(CACHE_CONTROL) && !response.headers.containsKey(EXPIRES)) {
nettyResponse.setHeader(CACHE_CONTROL, "no-cache");
}

Expand Down

0 comments on commit 3e42011

Please sign in to comment.