[svn:parrot] r46756 - trunk/runtime/parrot/library/HTTP

fperrad at svn.parrot.org fperrad at svn.parrot.org
Tue May 18 09:01:28 UTC 2010


Author: fperrad
Date: Tue May 18 09:01:28 2010
New Revision: 46756
URL: https://trac.parrot.org/parrot/changeset/46756

Log:
[LWP] add a default Content-Type in form-data

Modified:
   trunk/runtime/parrot/library/HTTP/Message.pir

Modified: trunk/runtime/parrot/library/HTTP/Message.pir
==============================================================================
--- trunk/runtime/parrot/library/HTTP/Message.pir	Tue May 18 08:25:46 2010	(r46755)
+++ trunk/runtime/parrot/library/HTTP/Message.pir	Tue May 18 09:01:28 2010	(r46756)
@@ -396,6 +396,9 @@
     if file == '' goto L8
     load_bytecode 'osutils.pbc'
     content = slurp(file)
+    $I0 = exists h['Content-Type']
+    if $I0 goto L8
+    h['Content-Type'] = 'application/octet-stream'
   L8:
     $I0 = exists h['Content-Disposition']
     unless $I0 goto L9


More information about the parrot-commits mailing list