HTTP header snafu
This commit is contained in:
parent
b3f35ba64c
commit
d6a4b0eb45
1 changed files with 2 additions and 3 deletions
|
|
@ -92,10 +92,8 @@ public class AlbumServlet
|
|||
if (size != null) {
|
||||
|
||||
try {
|
||||
res.setContentType("image/jpeg");
|
||||
FileEntry e = (FileEntry)DirectoryEntry.getEntry(file);
|
||||
scaleImage(req, res, file, e.getThumbnail(), size);
|
||||
res.setStatus(HttpServletResponse.SC_OK);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("sadness", e);
|
||||
|
|
@ -267,7 +265,8 @@ public class AlbumServlet
|
|||
|
||||
System.out.println(" " + key + " added to the cache with size " + cimg.bits.length + " -- now " + imageCache.getSize() + " entries");
|
||||
|
||||
//res.setContentType(cimg.mimeType);
|
||||
res.setStatus(HttpServletResponse.SC_OK);
|
||||
res.setContentType(cimg.mimeType);
|
||||
res.setContentLength(cimg.bits.length);
|
||||
res.getOutputStream().write(cimg.bits);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue