Mercurial Hosting > luan
comparison src/goodjava/webserver/RequestParser.java @ 2065:ffa02039a11a default tip
fix multipart content-type
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Tue, 18 Nov 2025 21:44:05 -0700 |
| parents | b10031b477a4 |
| children |
comparison
equal
deleted
inserted
replaced
| 2064:5fb3a2e6e533 | 2065:ffa02039a11a |
|---|---|
| 226 isBinary = true; | 226 isBinary = true; |
| 227 } else if( parser.match("text/") ) { | 227 } else if( parser.match("text/") ) { |
| 228 isBinary = false; | 228 isBinary = false; |
| 229 } else | 229 } else |
| 230 throw new ParseException(parser,"bad file content-type"); | 230 throw new ParseException(parser,"bad file content-type"); |
| 231 while( parser.inCharRange('a','z') || parser.inCharRange('0','9') || parser.anyOf("-.") ); | 231 while( parser.inCharRange('a','z') |
| 232 || parser.inCharRange('0','9') | |
| 233 || parser.anyOf("-.;= ") | |
| 234 ); | |
| 232 contentType = parser.textFrom(start); | 235 contentType = parser.textFrom(start); |
| 233 } | 236 } |
| 234 require( parser.match("\r\n") ); | 237 require( parser.match("\r\n") ); |
| 235 require( parser.match("\r\n") ); | 238 require( parser.match("\r\n") ); |
| 236 int start = parser.currentIndex(); | 239 int start = parser.currentIndex(); |
