#3208: allow to generate a 'no-content' HTTP response (a response with no body) -------------------------------------+------------------------------------- Reporter: mihai.preda@… | Owner: nobody Type: enhancement | Status: new Component: Core (Other) | Version: master Severity: normal | Resolution: Keywords: HttpResponse | Triage Stage: Design Has patch: 0 | decision needed Needs tests: 0 | Needs documentation: 0 Easy pickings: 0 | Patch needs improvement: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by yurii.zolotko@…):
* status: closed => new * ui_ux: => 0 * resolution: duplicate => * easy: => 0 Comment: #3362 doesn't solve the problem as it can't be done with existing HttpResponse class. There is still no way to send a response without Content-Type header with Django except this: {{{ response = HttpResponse(open(unknown_type_file).read()) del response['Content-Type'] }}} which is very ugly. According to [http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html] Content-Type header is not mandatory and can be omitted to make client guess file type, but it can't be done with Django as setting content_type to None sets it to DEFAULT_CONTENT_TYPE and not really None. -- Ticket URL: <https://code.djangoproject.com/ticket/3208#comment:4> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.