Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add README and change license to MIT.

  • Loading branch information...
commit ce759d8462e9b9b6e9e3b7bc82d5ef49e1866af9 1 parent 89e8714
Hongli Lai authored

Showing 2 changed files with 53 additions and 2 deletions. Show diff stats Hide diff stats

  1. +18 2 LICENSE
  2. +35 0 README.markdown
20 LICENSE
... ... @@ -1,3 +1,19 @@
1 1 Copyright (c) 2010 Hongli Lai
2   -You are not allowed to distribute this stuff until I've put a proper
3   -open source license on this.
  2 +
  3 +Permission is hereby granted, free of charge, to any person obtaining a copy
  4 +of this software and associated documentation files (the "Software"), to deal
  5 +in the Software without restriction, including without limitation the rights
  6 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7 +copies of the Software, and to permit persons to whom the Software is
  8 +furnished to do so, subject to the following conditions:
  9 +
  10 +The above copyright notice and this permission notice shall be included in
  11 +all copies or substantial portions of the Software.
  12 +
  13 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19 +THE SOFTWARE.
35 README.markdown
Source Rendered
... ... @@ -0,0 +1,35 @@
  1 +What is it?
  2 +===========
  3 +An simple, efficient parser for multipart MIME messages, based on
  4 +[Formidable's](http://github.com/felixge/node-formidable) parser.
  5 +
  6 +Why?
  7 +----
  8 +MIME multipart messages are a total pain to parse because the grammar is
  9 +so insane. Furthermore, the MIME specification is incredibly large. This
  10 +has led to an army of equally large and complex MIME libraries. If you
  11 +just want to parse a MIME multipart message without hassle then using all
  12 +of those libraries are less than ideal. They all tend to handle the kitchen
  13 +sink (e.g. they handling email parsing and all kinds of other stuff you don't
  14 +need) or they depend on other libraries that you may not want (e.g. APR, glib)
  15 +or they are under-documented or under-tested or just not efficient (e.g.
  16 +buffering all data in memory; good luck parsing a 2 GB file upload). You can
  17 +write your own parser but because the multipart grammar is so much of a pain
  18 +it's very easy to make mistakes.
  19 +
  20 +Goals and highlights of this parser
  21 +-----------------------------------
  22 +
  23 + * Multipart parsing, and only multipart parsing.
  24 + * Event-driven API.
  25 + * No dependencies on any external libraries, just straight C++ with STL.
  26 + * Efficient. Nothing in the input is buffered except what's absolutely
  27 + necessary for parsing.
  28 + * Only one level of multipart parsing. A multipart message part can itself
  29 + be a multipart message, but this parser doesn't attempt to provide a
  30 + complex API for handling nested multipart messages. Instead the developer
  31 + should just use another parser instance to parse nested messages.
  32 + * No I/O is handled for you. So this parser won't depend on any particular
  33 + I/O library or even any particular operating system's I/O API and won't
  34 + block on I/O by itself, giving you full control.
  35 + * Not thread-safe, but reentrant. No dependencies on any threading libraries.

0 comments on commit ce759d8

Please sign in to comment.
Something went wrong with that request. Please try again.