comparison src/goodjava/webserver/RequestParser.java @ 1773:b914a726061f

video multipart
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 18 Jul 2023 11:56:40 -0600
parents 8df0b80e715e
children
comparison
equal deleted inserted replaced
1772:f7b90d9a4639 1773:b914a726061f
218 int start = parser.currentIndex(); 218 int start = parser.currentIndex();
219 if( parser.match("application/") ) { 219 if( parser.match("application/") ) {
220 isBinary = true; 220 isBinary = true;
221 } else if( parser.match("image/") ) { 221 } else if( parser.match("image/") ) {
222 isBinary = true; 222 isBinary = true;
223 } else if( parser.match("video/") ) {
224 isBinary = true;
223 } else if( parser.match("text/") ) { 225 } else if( parser.match("text/") ) {
224 isBinary = false; 226 isBinary = false;
225 } else 227 } else
226 throw new ParseException(parser,"bad file content-type"); 228 throw new ParseException(parser,"bad file content-type");
227 while( parser.inCharRange('a','z') || parser.anyOf("-.") ); 229 while( parser.inCharRange('a','z') || parser.inCharRange('0','9') || parser.anyOf("-.") );
228 contentType = parser.textFrom(start); 230 contentType = parser.textFrom(start);
229 } 231 }
230 require( parser.match("\r\n") ); 232 require( parser.match("\r\n") );
231 require( parser.match("\r\n") ); 233 require( parser.match("\r\n") );
232 int start = parser.currentIndex(); 234 int start = parser.currentIndex();