diff options
author | Max Romanov <max.romanov@nginx.com> | 2019-06-28 12:19:40 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2019-06-28 12:19:40 +0300 |
commit | 3ceec5f4d2fa59adc1c5764ef491a8f848bbf452 (patch) | |
tree | 086cc14e9f38c052fa187759ed13b351b464ac71 /src/java/nginx/unit/Context.java | |
parent | a2c1907fda8d589db72a9ccd7543f307c1eacbaf (diff) | |
download | unit-3ceec5f4d2fa59adc1c5764ef491a8f848bbf452.tar.gz unit-3ceec5f4d2fa59adc1c5764ef491a8f848bbf452.tar.bz2 |
Java: adding Content-Type response header for static files.
Diffstat (limited to '')
-rw-r--r-- | src/java/nginx/unit/Context.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/java/nginx/unit/Context.java b/src/java/nginx/unit/Context.java index f6d5e339..3c64e99f 100644 --- a/src/java/nginx/unit/Context.java +++ b/src/java/nginx/unit/Context.java @@ -313,6 +313,7 @@ public class Context implements ServletContext, InitParams } else { response.setContentLengthLong(f.length()); + response.setContentType(getMimeType(f.getName())); InputStream is = new FileInputStream(f); byte[] buffer = new byte[response.getBufferSize()]; |