Skip to content

Commit

Permalink
1.0.12: respect Pragma no-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorium committed Sep 10, 2016
1 parent 8247f61 commit 0fc345f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 1.0.12 - September 10 2016
* Respect Pragma no-cache

### 1.0.11 - September 06 2016
* Added compression based on Mime type
* eTag cache: cancel work if can send 304
Expand Down
8 changes: 4 additions & 4 deletions src/Owin.Compression/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("Owin.Compression")>]
[<assembly: AssemblyProductAttribute("Owin.Compression")>]
[<assembly: AssemblyDescriptionAttribute("Compression (Deflate / GZip) module for Microsoft OWIN Selfhost filesystem pipeline.")>]
[<assembly: AssemblyVersionAttribute("1.0.11")>]
[<assembly: AssemblyFileVersionAttribute("1.0.11")>]
[<assembly: AssemblyVersionAttribute("1.0.12")>]
[<assembly: AssemblyFileVersionAttribute("1.0.12")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "1.0.11"
let [<Literal>] InformationalVersion = "1.0.11"
let [<Literal>] Version = "1.0.12"
let [<Literal>] InformationalVersion = "1.0.12"
3 changes: 2 additions & 1 deletion src/Owin.Compression/CompressionModule.fs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ module OwinCompression =
false

let checkNoValidETag (itemToCheck:Stream) =
if context.Request.Headers.ContainsKey("If-None-Match") then
if context.Request.Headers.ContainsKey("If-None-Match") && context.Request.Headers.["If-None-Match"] <> null &&
(not(context.Request.Headers.ContainsKey("Pragma")) || context.Request.Headers.["Pragma"] <> "no-cache") then
if context.Request.Headers.["If-None-Match"] = context.Response.ETag then
create304Response()
else
Expand Down

0 comments on commit 0fc345f

Please sign in to comment.