Mercurial Hosting > luan
view src/luan/webserver/Request.java @ 1237:275d1b52dbce
add Request.scheme
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 11 Jun 2018 18:22:51 -0600 |
parents | e2d2354807f3 |
children | e8020216dee7 |
line wrap: on
line source
package luan.webserver; import java.util.Map; import java.util.LinkedHashMap; import java.util.Collections; public class Request { public volatile String rawHead; public volatile String method; public volatile String rawPath; public volatile String path; public volatile String protocol; // only HTTP/1.1 is accepted public volatile String scheme; public final Map<String,Object> headers = Collections.synchronizedMap(new LinkedHashMap<String,Object>()); public final Map<String,Object> parameters = Collections.synchronizedMap(new LinkedHashMap<String,Object>()); public final Map<String,String> cookies = Collections.synchronizedMap(new LinkedHashMap<String,String>()); public volatile byte[] body; public static final class MultipartFile { public final String filename; public final Object content; // byte[] or String MultipartFile(String filename,Object content) { this.filename = filename; this.content = content; } public String toString() { return "{filename="+filename+", content="+content+"}"; } } }