Ensure content_type is set when passing empty body to RequestFactory by rpkilby · Pull Request #5351 · encode/django-rest-framework (original) (raw)

@rpkilby I'm happy to merge this.

I just had the one question about adding content_type to extra — this means it will always be applied.

Perhaps that's right—I can't see a problem with it—but I wonder if we shouldn't defer to Django setting it from the content_type parameter (rather than extras) and only set it after the super call if/when it comes back None? Happy to go with whatever you think there.