**Enhancements** * ContextManager now passes the namespace/name of the desired state to StateProv iderInterface::provideState(). This is helpful when a single StateProvider obje ct provides multiple states, and needs to know which one ContextManager is askin g for. * The mime parser was hardened against duplicate boundaries. * Added functionality to add and remove AudioPlayer observers to the DefaultClie nt. * Unit tests for Alerts were added. * Added en-IN, en-CA and ja-JP to the SampleApp locale selection menu. * Added default alert and timer audio data to the SDK SampleApp. There is no lo nger a requirement to download these audio files and configure them in the json configuration file. * Added support in SDS Reader and AttachmentReader for seeking into the future. This allows a reader to move to an index which has not yet arrived in the SDS a nd poll/block until it arrives. * Added support for blocking Writers in the SharedDataStream class. * Changed the default status code sent by MessageRequestObserverInterface::onSen dCompleted() to SERVER_OTHER_ERROR, and mapped HTTP code 500 to SERVER_INTERNAL_ ERROR_V2. * Added support for parsing stream duration out of playlists. * Added a configuration option ("sampleApp":"displayCardsSupported") that allows the displaying of display cards to be enabled or disabled. * Named Timers and Reminders have been updated to fall back to the on-device bac kground audio sound when cloud urls cannot be accessed or rendered. **Bug Fixes** * Removed floating point dependencies from core SDK libraries. * Fixed bug in SpeechSynthesizer where it's erroneously calling stop more than once. * Fixed an issue in ContentFetcher where it could hang during destruction until an active GET request completed. * Fixed a couple of parsing bugs in LibCurlHttpContentFetcher related to case-sensitivity and mime-type handling. * Fixed a bug where MediaPlayerObserverInterface::onPlaybackResumed() wasn't being called after resuming from a pause with a pending play/resume. * Fixed a bug in LibCurlContentFetcher where it could error out if data is written to the SDS faster than it is consumed. * The GStreamer-based MediaPlayer reference implementation now uses the ACL HTTP configured client. * An API change has been made to MediaPlayerInterface::setSource(). This method now takes in an optional offset as well to allow for immediately streaming to the offset if possible. * Next and Previous buttons now work with Audible. * Pandora resume stuttering is addressed. * Pausing and resuming Amazon music no longer seeks back to the beginning of the song. * libcurl CURLOPT_NOSIGNAL option is set to 1 (https://curl.haxx.se/libcurl/c/CURLOPT_NOSIGNAL.html) to avoid crashes observed in SampleApp. * Fixed the timing of the PlaybackReportIntervalEvent and PlaybackReportDelayEvent as specified in the directives. * Fixed potential deadlocks in MediaPlayer during shutdown related to queued callbacks. * Fixed a crash in MediaPlayer that could occur if the network is disconnected during playback. * Fixed a bug where music could keep playing while Alexa is speaking. * Fixed a bug which was causing problems with pause/resume and next/previous with Amazon Music. * Fixed a bug where music could briefly start playing between speaks. * Fixed a bug where HLS playlists would stop streaming after the initial playlist had been played to completion. * Fixed a bug where Audible playback could not advance to the next chapter. * Fixed some occurrences of SDK entering the IDLE state during the transition between Listening and Speaking states. * Fixed a bug where PlaybackFinished events were not reporting the correct offset. * An API change has been made to MediaPlayerInterface::getOffset(). This method is now required to return the final offset when called after playback has stopped. * Fixed a problem where AIP was erroneously resetting its state upon getting a cancelDirective() callback. **Known Issues** * Capability agent for Notifications is not included in this release. * `ACL`'s asynchronous receipt of audio attachments may manage resources poorly in scenarios where attachments are received but not consumed. * GUI cards don't show for Kindle. * The new SpeechSynthesizerState state values GAINING_FOCUS and LOSING_FOCUS were added as part of a work-around. The will likely be removed in subsequent releases. * With the gstreamer-based MediaPlayer, after muting and unmuting, the next item starts playing rather than continuing with the current item. |
||
---|---|---|
.. | ||
.gitignore | ||
LICENSE | ||
MultipartParser.h | ||
MultipartReader.h | ||
README.markdown | ||
Rakefile | ||
formidable_parser.js | ||
input.txt | ||
multipart.cpp | ||
rack-parser.rb |
README.markdown
What is it?
An simple, efficient parser for multipart MIME messages, based on Formidable'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
- Multipart parsing, and only multipart parsing.
- Event-driven API.
- No dependencies on any external libraries, just straight C++ with STL.
- Efficient. Nothing in the input is buffered except what's absolutely necessary for parsing.
- Only one level of multipart parsing. A multipart message part can itself be a multipart message, but this parser doesn't attempt to provide a complex API for handling nested multipart messages. Instead the developer should just use another parser instance to parse nested messages.
- No I/O is handled for you. This parser won't depend on any particular I/O library or even any particular operating system's I/O API. It won't block on I/O by itself, giving you full control over when (not) to block. It won't save data to files by itself, giving you full control over what to do with the parsed data.
- Not thread-safe, but reentrant. No dependencies on any threading libraries.