Mercurial Hosting > luan
comparison src/goodjava/webserver/handlers/FileHandler.java @ 2008:bba3e529e346 default tip
chunked encoding
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 27 Aug 2025 01:14:17 -0600 |
parents | fa066aaa068c |
children |
comparison
equal
deleted
inserted
replaced
2007:408f7dd7e503 | 2008:bba3e529e346 |
---|---|
54 } | 54 } |
55 | 55 |
56 } catch(ParseException e) {} | 56 } catch(ParseException e) {} |
57 } | 57 } |
58 response.headers.put("Last-Modified",lastModified); | 58 response.headers.put("Last-Modified",lastModified); |
59 | 59 response.headers.put("Content-Length",Long.toString(file.length())); |
60 response.body = new Response.Body( file.length(), new FileInputStream(file) ); | 60 response.body = new FileInputStream(file); |
61 return response; | 61 return response; |
62 } | 62 } |
63 return null; | 63 return null; |
64 } catch(IOException e) { | 64 } catch(IOException e) { |
65 throw new RuntimeException(e); | 65 throw new RuntimeException(e); |