comparison src/goodjava/webserver/Response.java @ 1605:ef9d96aeb541

use FileHandler in WebHandler
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 17 Apr 2021 18:11:37 -0600
parents 27efb1fcbcb5
children fa066aaa068c
comparison
equal deleted inserted replaced
1604:8a7519dee55c 1605:ef9d96aeb541
11 public class Response { 11 public class Response {
12 public final String protocol = "HTTP/1.1"; 12 public final String protocol = "HTTP/1.1";
13 public volatile Status status = Status.OK; 13 public volatile Status status = Status.OK;
14 public final Map<String,Object> headers = Collections.synchronizedMap(new LinkedHashMap<String,Object>()); 14 public final Map<String,Object> headers = Collections.synchronizedMap(new LinkedHashMap<String,Object>());
15 { 15 {
16 headers.put("server","Goodjava"); 16 headers.put("server","goodjava");
17 } 17 }
18 private static final Body empty = new Body(0,new InputStream(){ 18 private static final Body empty = new Body(0,new InputStream(){
19 public int read() { return -1; } 19 public int read() { return -1; }
20 }); 20 });
21 public volatile Body body = empty; 21 public volatile Body body = empty;