multipart-stream-rs

Rust library to parse and serialize async multipart/x-mixed-replace streams. (by scottlamb)

Multipart-stream-rs Alternatives

Similar projects and alternatives to multipart-stream-rs

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better multipart-stream-rs alternative or higher similarity.

multipart-stream-rs reviews and mentions

Posts with mentions or reviews of multipart-stream-rs. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-04-25.
  • Introduction to HTTP Multipart
    4 projects | news.ycombinator.com | 25 Apr 2023
    The article talks about multipart/form-data in particular.

    Another thing one might run across is multipart/x-mixed-replace. I wrote a crate for that. [1] I didn't see a spec for it, but someone since pointed out to me that it's probably identical to multipart/x-mixed, and now seeing an example in the multer README it clicks that I should have looked at RFC 1341, which says this:

    > All subtypes of "multipart" share a common syntax, defined in this section.

    ...and written a crate general enough for all of them. Maybe I'll update my crate for that sometime. My crate currently assumes there's a Content-Length: for each part, which isn't specified there but makes sense in the context I use it. It wouldn't be hard to also support just the boundary delimiters. And then maybe add a form-data parser on top of that.

    btw, the article also talks specifically about proxying the body. I don't get why they're parsing the multipart data at all. I presume they have a reason, but I don't see it explained. I'd expect that a body is a body is a body. You can stream it along, and perhaps also buffer it in case you want to support retrying the backhaul request, probably stopping the buffering at some byte limit at which you give up on the possibility of retries, because keeping arbitrarily large bodies around (in RAM or even spilling to SSD/disk) doesn't sound fun.

    [1] https://crates.io/crates/multipart-stream

  • What's everyone working on this week (17/2021)?
    8 projects | /r/rust | 26 Apr 2021
    I find my implementation in parser.rs kind of gross, but at least it seems to work. If anyone happens to look, I'd appreciate tips for cleaning up this code.

Stats

Basic multipart-stream-rs repo stats
2
6
0.0
over 1 year ago

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com