Commits

Jesper Nøhr committed 4112d6a

applying patch from #46, thanks gciotta

  • Participants
  • Parent commits 6668423

Comments (0)

Files changed (1)

File piston/utils.py

         
     def is_multipart(self):
         content_type = self.content_type()
+
         if content_type is not None:
             return content_type.lstrip().startswith('multipart')
+
         return False
 
     def loader_for_type(self, ctype):
         for a certain mimetype.
         """
         for loadee, mimes in Mimer.TYPES.iteritems():
-            if ctype in mimes:
-                return loadee
+            for mime in mimes:
+                if ctype.startswith(mime):
+                    return loadee
 
     def content_type(self):
         """
 
         ctype = self.request.META.get('CONTENT_TYPE', type_formencoded)
         
-        if ctype == type_formencoded:
+        if ctype.startswith(type_formencoded):
             return None
         
         return ctype