Fix for #1313 & #1332

For issue #1313, partial fix: enhance coding/deconding to missing part.
Now filename is correctly undecoded. 
Name and Value must be encoded to allow parsing (respect of HTTP RFC where all name and values must URI encoded to prevent wrong parsing).
However some items were not correctly decoded, so probably the root of the issue.

For issue #1332, add text/plain to content-type as default type if not specified.