Opened 8 years ago

Closed 4 years ago

Last modified 4 years ago

#9403 closed Bug (duplicate)

_set_content needs to perform the same _is_string check as the Constructor

Reported by: magneto Owned by: nobody
Component: HTTP handling Version: master
Severity: Normal Keywords:
Cc: yozh Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In the HttpResponse constructor one checks that the input content is a string or an iterator itself.

shouldn't _set_content do the same as well?


Attachments (1)

httpResp_set_content.diff (1.3 KB) - added by magneto 8 years ago.

Download all attachments as: .zip

Change History (14)

Changed 8 years ago by magneto

Attachment: httpResp_set_content.diff added

comment:1 Changed 8 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:2 Changed 8 years ago by Jacob

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedDesign decision needed

Can you explain why this would be needed? Is there an error you've found?

comment:3 Changed 8 years ago by Malcolm Tredinnick

Triage Stage: Design decision neededAccepted

I think I understand this one (from memory, it looked pretty obvious the first time I saw it). Is we allow passing an interator to the constructor, then it's consistent to allow also setting the content using the same iterator: it's the same process, just slightly delayed. Right now, that won't work.

Move to "accepted", but if you've got some broader problem, Jacob, feel free to override me. Iterators and HttpResponse are pretty funky right now anyway.

comment:4 Changed 7 years ago by Thejaswi Puthraya

Component: UncategorizedHTTP handling

comment:5 Changed 7 years ago by yozh

Cc: yozh added

comment:6 Changed 6 years ago by yozh

Could you please resolve the issue? I need to call wsgi handler from django.

comment:7 Changed 5 years ago by Julien Phalip

Needs tests: set
Severity: Normal
Type: Uncategorized

comment:8 Changed 5 years ago by Luke Plant

Type: UncategorizedBug

comment:9 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:10 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:11 Changed 4 years ago by David Gouldin

Looks like a duplicate of #16494.

comment:12 Changed 4 years ago by anonymous

Resolution: duplicate
Status: newclosed

Agreed, this has been fixed in that other ticket.

comment:13 Changed 4 years ago by Julien Phalip

Sorry that was me :)

Note: See TracTickets for help on using tickets.
Back to Top