comparison src/luan/webserver/Connection.java @ 1258:e4d7a3114fa8

support "Content-Type: application/json; charset=utf-8"
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 20 Sep 2018 22:11:11 -0600
parents 275d1b52dbce
children 05934fbf635a
comparison
equal deleted inserted replaced
1257:e38f5869e9df 1258:e4d7a3114fa8
86 if( contentType != null ) { 86 if( contentType != null ) {
87 if( "application/x-www-form-urlencoded".equals(contentType) ) { 87 if( "application/x-www-form-urlencoded".equals(contentType) ) {
88 parser.parseUrlencoded(); 88 parser.parseUrlencoded();
89 } else if( contentType.startsWith("multipart/form-data;") ) { 89 } else if( contentType.startsWith("multipart/form-data;") ) {
90 parser.parseMultipart(); 90 parser.parseMultipart();
91 } else if( contentType.equals("application/json; charset=utf-8") ) {
92 parser.parseJson();
91 } else { 93 } else {
92 logger.info("unknown request content-type: "+contentType); 94 logger.info("unknown request content-type: "+contentType);
93 } 95 }
94 } 96 }
95 97