comparison src/luan/webserver/Response.java @ 1160:4beabb087be6

add http/impl
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 05 Feb 2018 22:33:59 -0700
parents 49fb4e83484f
children 6baccd0c85a7
comparison
equal deleted inserted replaced
1159:3ef883468fd0 1160:4beabb087be6
12 public volatile Status status = Status.OK; 12 public volatile Status status = Status.OK;
13 public final Map<String,Object> headers = Collections.synchronizedMap(new LinkedHashMap<String,Object>()); 13 public final Map<String,Object> headers = Collections.synchronizedMap(new LinkedHashMap<String,Object>());
14 { 14 {
15 headers.put("server","Luan"); 15 headers.put("server","Luan");
16 } 16 }
17 public volatile Body body; 17 private static final Body empty = new Body(0,new InputStream(){
18 public int read() { return -1; }
19 });
20 public volatile Body body = empty;
18 21
19 public static class Body { 22 public static class Body {
20 public final long length; 23 public final long length;
21 public final InputStream content; 24 public final InputStream content;
22 25