The pullrequest for issues #20 and #18

Hi,
These updates permit to :
 - have a "content-length" to the http header (for my transmission server it's essential)
 - upload a torrent file
Bye