Mercurial Hosting > luan
diff src/luan/webserver/Connection.java @ 1266:05934fbf635a
content-type "application/x-www-form-urlencoded; charset=utf-8"
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 30 Sep 2018 19:10:48 -0600 |
parents | e4d7a3114fa8 |
children | 8b61c8c4e07a |
line wrap: on
line diff
--- a/src/luan/webserver/Connection.java Tue Sep 25 19:51:34 2018 -0600 +++ b/src/luan/webserver/Connection.java Sun Sep 30 19:10:48 2018 -0600 @@ -84,8 +84,11 @@ String contentType = (String)request.headers.get("content-type"); if( contentType != null ) { + contentType = contentType.toLowerCase(); if( "application/x-www-form-urlencoded".equals(contentType) ) { - parser.parseUrlencoded(); + parser.parseUrlencoded(null); + } else if( "application/x-www-form-urlencoded; charset=utf-8".equals(contentType) ) { + parser.parseUrlencoded("utf-8"); } else if( contentType.startsWith("multipart/form-data;") ) { parser.parseMultipart(); } else if( contentType.equals("application/json; charset=utf-8") ) {