uNetworking / uWebSockets

Simple, secure & standards compliant web server for the most demanding of applications
Apache License 2.0
17.24k stars 1.75k forks source link

Multipart with quoted boundary is not parsed correctly, which is not standard compliant. #1248

Open fragrans opened 3 years ago

fragrans commented 3 years ago

I was using Powershell scripts to run some tests with my app embedded with uWebsockets, and found wired errors; I googled around, found this: https://github.com/PowerShell/PowerShell/issues/9241

ghost commented 3 years ago

MultipartParser does not work with " like you say. This is not an issue in most cases but apparently Microsoft's tools rely on this.

fragrans commented 3 years ago

I had to remove quotes inside MultipartParser.prependedBoundary directly after construct;

ghost commented 3 years ago

Really the WebSocketExtensions parsing and MultipartParser and HttpParser should be refactored to share the same parsings for things like XX="YY"; ZZ="ÅÅ" kind of parsing that is used in web protocols.