Issue #99 resolved

Bad Request and Content-Type (with FIX)

Anonymous created an issue

Problem: Get a bad request HTTP 400 error when my content-type is set to

Content-Type application/x-www-form-urlencoded; charset=UTF-8



    type_formencoded = "application/x-www-form-urlencoded"

    ctype = self.request.META.get('CONTENT_TYPE', type_formencoded)
if ctype == type_formencoded:

FIX: <<<< if ctype.find(type_formencoded)!=-1:

Then it should work as expected.

Comments (2)

  1. Jesper Nøhr repo owner
    • changed status to open

    Hm, are you coming from a Java(script) background?

    A better way would be:

    if type_formencoded in ctype:

    I'll commit a fix in a minute.

  2. Log in to comment