Mercurial Hosting > luan
comparison src/luan/lib/webserver/Request.java @ 1347:643cf1c37723
move webserver to lib and bug fixes
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 25 Feb 2019 13:02:33 -0700 |
parents | src/luan/webserver/Request.java@383f924dfe9d |
children | 4c5548a61d4f |
comparison
equal
deleted
inserted
replaced
1346:efd1c6380f2c | 1347:643cf1c37723 |
---|---|
1 package luan.lib.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 path; | |
13 public volatile String protocol; // only HTTP/1.1 is accepted | |
14 public volatile String scheme; | |
15 public final Map<String,Object> headers = Collections.synchronizedMap(new LinkedHashMap<String,Object>()); | |
16 public final Map<String,Object> parameters = Collections.synchronizedMap(new LinkedHashMap<String,Object>()); | |
17 public final Map<String,String> cookies = Collections.synchronizedMap(new LinkedHashMap<String,String>()); | |
18 public volatile byte[] body; | |
19 | |
20 public static final class MultipartFile { | |
21 public final String filename; | |
22 public final String contentType; | |
23 public final Object content; // byte[] or String | |
24 | |
25 public MultipartFile(String filename,String contentType,Object content) { | |
26 this.filename = filename; | |
27 this.contentType = contentType; | |
28 this.content = content; | |
29 } | |
30 | |
31 public String toString() { | |
32 return "{filename="+filename+", content="+content+"}"; | |
33 } | |
34 } | |
35 } |