1.9 - GET requests without Content-Type specified given text/plain content type

17 views
Skip to first unread message

peter...@iwoca.co.uk

unread,
Sep 27, 2017, 7:43:35 AM9/27/17
to Django users
Hi,

If I'm running my app locally with ./manage.py runserver when I make a GET request without specifying a Content-Type header the request object in django has request.META['CONTENT_TYPE'] == 'text/plain'.

I can't for the life of me work out where this is coming from, I'm reasonably sure the GET request I send is not defaulting to adding a Content-Type header with the value of text/plain (I have tried the GET request using python-requests and the Postman chrome extension, same behaviour in both cases), and it does not appear to be the value of DEFAULT_CONTENT_TYPE as I changed that to something other than text/plainn and my GET requests still had a request.META['CONTENT_TYPE'] == 'text/plain'.

Is this the expected behaviour? Is there any way to stop it?

Cheers,

Pete 
Reply all
Reply to author
Forward
0 new messages