At present, the parser uses format! to generate strings during parsing. These should be removed.
https://github.com/rousan/multer-rs/blob/fe853d64f3bb7763866bdaa90c617a11a6bde505/src/multipart.rs#L255
https://github.com/rousan/multer-rs/blob/fe853d64f3bb7763866bdaa90c617a11a6bde505/src/multipart.rs#L312
https://github.com/rousan/multer-rs/blob/fe853d64f3bb7763866bdaa90c617a11a6bde505/src/buffer.rs#L108
There are a couple of approaches:
- Change the scanning code so that the parts of the joined string are searched for individually in succession. IE, find
BOUNDARY_EXT and check if the next bytes are boundary.
- Cache the formatted strings in something like
Storage. This is probably the easier approach.
At present, the parser uses
format!to generate strings during parsing. These should be removed.https://github.com/rousan/multer-rs/blob/fe853d64f3bb7763866bdaa90c617a11a6bde505/src/multipart.rs#L255
https://github.com/rousan/multer-rs/blob/fe853d64f3bb7763866bdaa90c617a11a6bde505/src/multipart.rs#L312
https://github.com/rousan/multer-rs/blob/fe853d64f3bb7763866bdaa90c617a11a6bde505/src/buffer.rs#L108
There are a couple of approaches:
BOUNDARY_EXTand check if the next bytes areboundary.Storage. This is probably the easier approach.