changeset 1773:b914a726061f

video multipart
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 18 Jul 2023 11:56:40 -0600
parents f7b90d9a4639
children 764723436f05
files src/goodjava/webserver/RequestParser.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
diff -r f7b90d9a4639 -r b914a726061f src/goodjava/webserver/RequestParser.java
--- a/src/goodjava/webserver/RequestParser.java	Sun Jun 25 15:21:08 2023 -0600
+++ b/src/goodjava/webserver/RequestParser.java	Tue Jul 18 11:56:40 2023 -0600
@@ -220,11 +220,13 @@
 					isBinary = true;
 				} else if( parser.match("image/") ) {
 					isBinary = true;
+				} else if( parser.match("video/") ) {
+					isBinary = true;
 				} else if( parser.match("text/") ) {
 					isBinary = false;
 				} else
 					throw new ParseException(parser,"bad file content-type");
-				while( parser.inCharRange('a','z') || parser.anyOf("-.") );
+				while( parser.inCharRange('a','z') || parser.inCharRange('0','9') || parser.anyOf("-.") );
 				contentType = parser.textFrom(start);
 			}
 			require( parser.match("\r\n") );