GitHub - FooBarWidget/multipart-parser: A C++ multipart MIME parser that isn't bloated with unnecessary stuff and doesn't depend on huge external libraries (original) (raw)

What is it?

An simple, efficient parser for multipart MIME messages, based onFormidable's parser.

Why?

MIME multipart messages are a total pain to parse because the grammar is so insane. Furthermore, the MIME specification is incredibly large. This has led to an army of equally large and complex MIME libraries. If you just want to parse a MIME multipart message without hassle then using all of those libraries are less than ideal. They all tend to handle the kitchen sink (e.g. they handling email parsing and all kinds of other stuff you don't need) or they depend on other libraries that you may not want (e.g. APR, glib) or they are under-documented or under-tested or just not efficient (e.g. buffering all data in memory; good luck parsing a 2 GB file upload). You can write your own parser but because the multipart grammar is so much of a pain it's very easy to make mistakes.

Goals and highlights of this parser