diff src/luan/webserver/Connection.java @ 1146:2dda3c92a473

webserver - implement cookies
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 01 Feb 2018 03:08:21 -0700
parents 12ececf30597
children 30d87b7d1d62
line wrap: on
line diff
--- a/src/luan/webserver/Connection.java	Wed Jan 31 01:43:50 2018 -0700
+++ b/src/luan/webserver/Connection.java	Thu Feb 01 03:08:21 2018 -0700
@@ -63,7 +63,7 @@
 				RequestParser parser = new RequestParser(request);
 				parser.parseHead();
 	
-				String lenStr = request.headers.get("Content-Length");
+				String lenStr = (String)request.headers.get("Content-Length");
 				if( lenStr != null ) {
 					int len = Integer.parseInt(lenStr);
 					byte[] body = new byte[len];
@@ -80,7 +80,7 @@
 //System.out.println(request.body);
 				}
 
-				String contentType = request.headers.get("Content-Type");
+				String contentType = (String)request.headers.get("Content-Type");
 				if( contentType != null ) {
 					if( request.body == null ) {
 						logger.error("body is null");