Mercurial Hosting > luan
comparison 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 |
comparison
equal
deleted
inserted
replaced
1265:3f4644246e39 | 1266:05934fbf635a |
---|---|
82 //System.out.println(new String(request.body)); | 82 //System.out.println(new String(request.body)); |
83 } | 83 } |
84 | 84 |
85 String contentType = (String)request.headers.get("content-type"); | 85 String contentType = (String)request.headers.get("content-type"); |
86 if( contentType != null ) { | 86 if( contentType != null ) { |
87 contentType = contentType.toLowerCase(); | |
87 if( "application/x-www-form-urlencoded".equals(contentType) ) { | 88 if( "application/x-www-form-urlencoded".equals(contentType) ) { |
88 parser.parseUrlencoded(); | 89 parser.parseUrlencoded(null); |
90 } else if( "application/x-www-form-urlencoded; charset=utf-8".equals(contentType) ) { | |
91 parser.parseUrlencoded("utf-8"); | |
89 } else if( contentType.startsWith("multipart/form-data;") ) { | 92 } else if( contentType.startsWith("multipart/form-data;") ) { |
90 parser.parseMultipart(); | 93 parser.parseMultipart(); |
91 } else if( contentType.equals("application/json; charset=utf-8") ) { | 94 } else if( contentType.equals("application/json; charset=utf-8") ) { |
92 parser.parseJson(); | 95 parser.parseJson(); |
93 } else { | 96 } else { |