Mercurial Hosting > luan
comparison src/luan/webserver/RequestParser.java @ 1299:c214cd0413dd
allow upload images
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 10 Jan 2019 23:40:52 -0700 |
parents | 05934fbf635a |
children | 8b61c8c4e07a |
comparison
equal
deleted
inserted
replaced
1298:01a380c494f2 | 1299:c214cd0413dd |
---|---|
215 require( parser.match("\r\n") ); | 215 require( parser.match("\r\n") ); |
216 require( parser.match("Content-Type: ") ); | 216 require( parser.match("Content-Type: ") ); |
217 int start = parser.currentIndex(); | 217 int start = parser.currentIndex(); |
218 if( parser.match("application/") ) { | 218 if( parser.match("application/") ) { |
219 isBinary = true; | 219 isBinary = true; |
220 } else if( parser.match("image/") ) { | |
221 isBinary = true; | |
220 } else if( parser.match("text/") ) { | 222 } else if( parser.match("text/") ) { |
221 isBinary = false; | 223 isBinary = false; |
222 } else | 224 } else |
223 throw new ParseException(parser,"bad file content-type"); | 225 throw new ParseException(parser,"bad file content-type"); |
224 while( parser.inCharRange('a','z') || parser.anyOf("-.") ); | 226 while( parser.inCharRange('a','z') || parser.anyOf("-.") ); |