Supported protocols:
The Upload classes (derived from Upload_Base) are used to construct and generate various forms of MIME formatted bodies for transmission either through HTTP (HTTP requests are based on the Upload classes), SMTP, NNTP or other formats.
Upload_Base maintains the list of headers and manages the overall generation process, while subclasses perform payload operations.
API documentation generated by Doxygen contains information about the internal organization of the module.
The module is moderately large
Various features can be enabled or disabled, either through feature defines or specific defines
Most of the functions LEAVE in case of OOM
Most of the module is client pull based, and OOM is reported to the caller
Upload elements are usually not kept for long, and their allocated size depends on the number of elements and actual bodysize.
Usually large objects are allocated. In some cases sizeable objects are placed on the stack but only for shorter periods.
In most cases stack consumption should be less than 300 bytes.
The module does not use global variables, but few small const arrays exist
No caching is performed. All storage is for the current request and only lives as long as the owner permits it.
No persistent memory is allocated by the module. The owners of the Upload elements must make sure to delete the objects they have created.
The RFC 2231 header parameter construction use the shared TempBuf and TempBuf2 buffers. No check about previous use are made
At present there are no opportunities to tune memory use.
Selftests, but they do not check memory usage.
Selftests, uploading files, posting forms, sending email, ordinary HTTP surfing.
Headers and uploade elements are implemented as lists to ease construction
No improvements planned
The central code is in Upload_Handler and Upload_Base with implementations adapted to specific use as sub-classes of the Upload_Handler class. The classes include