Mercurial Hosting > luan
comparison src/goodjava/webserver/Request.java @ 1402:27efb1fcbcb5
move luan.lib to goodjava
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 17 Sep 2019 01:35:01 -0400 |
parents | src/luan/lib/webserver/Request.java@4c5548a61d4f |
children | fa066aaa068c |
comparison
equal
deleted
inserted
replaced
1401:ef1620aa99cb | 1402:27efb1fcbcb5 |
---|---|
1 package goodjava.webserver; | |
2 | |
3 import java.util.Map; | |
4 import java.util.LinkedHashMap; | |
5 import java.util.Collections; | |
6 | |
7 | |
8 public class Request { | |
9 public volatile String rawHead; | |
10 public volatile String method; | |
11 public volatile String rawPath; | |
12 public volatile String originalPath; | |
13 public volatile String path; | |
14 public volatile String protocol; // only HTTP/1.1 is accepted | |
15 public volatile String scheme; | |
16 public final Map<String,Object> headers = Collections.synchronizedMap(new LinkedHashMap<String,Object>()); | |
17 public final Map<String,Object> parameters = Collections.synchronizedMap(new LinkedHashMap<String,Object>()); | |
18 public final Map<String,String> cookies = Collections.synchronizedMap(new LinkedHashMap<String,String>()); | |
19 public volatile byte[] body; | |
20 | |
21 public static final class MultipartFile { | |
22 public final String filename; | |
23 public final String contentType; | |
24 public final Object content; // byte[] or String | |
25 | |
26 public MultipartFile(String filename,String contentType,Object content) { | |
27 this.filename = filename; | |
28 this.contentType = contentType; | |
29 this.content = content; | |
30 } | |
31 | |
32 public String toString() { | |
33 return "{filename="+filename+", content="+content+"}"; | |
34 } | |
35 } | |
36 } |