summaryrefslogtreecommitdiffhomepage
path: root/src/java
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2019-06-28 12:19:40 +0300
committerMax Romanov <max.romanov@nginx.com>2019-06-28 12:19:40 +0300
commit3ceec5f4d2fa59adc1c5764ef491a8f848bbf452 (patch)
tree086cc14e9f38c052fa187759ed13b351b464ac71 /src/java
parenta2c1907fda8d589db72a9ccd7543f307c1eacbaf (diff)
downloadunit-3ceec5f4d2fa59adc1c5764ef491a8f848bbf452.tar.gz
unit-3ceec5f4d2fa59adc1c5764ef491a8f848bbf452.tar.bz2
Java: adding Content-Type response header for static files.
Diffstat (limited to 'src/java')
-rw-r--r--src/java/nginx/unit/Context.java1
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()];