diff src/goodjava/webserver/Request.java @ 1736:a02a75e3daa8

webserver error handling
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 16 Oct 2022 11:44:23 -0600
parents fa066aaa068c
children
line wrap: on
line diff
--- a/src/goodjava/webserver/Request.java	Sun Oct 02 17:32:00 2022 -0600
+++ b/src/goodjava/webserver/Request.java	Sun Oct 16 11:44:23 2022 -0600
@@ -19,6 +19,10 @@
 	public final Map<String,String> cookies = Collections.synchronizedMap(new LinkedHashMap<String,String>());
 	public volatile byte[] body;
 
+	public String url() {
+		return scheme + "://" + headers.get("Host") + rawPath;
+	}
+
 	public static final class MultipartFile {
 		public final String filename;
 		public final String contentType;