Commits

Daniel Poelzleithner committed ad9d504

fix not RFC content-type matching

Comments (0)

Files changed (1)

         """
         for loadee, mimes in Mimer.TYPES.iteritems():
             for mime in mimes:
-                if ctype.startswith(mime):
+                if ctype == mime:
                     return loadee
                     
     def content_type(self):
         type_formencoded = "application/x-www-form-urlencoded"
 
         ctype = self.request.META.get('CONTENT_TYPE', type_formencoded)
-        
-        if type_formencoded in ctype:
+        ctype = ctype.split(";")[0]
+
+        if type_formencoded == ctype:
             return None
         
         return ctype