Opened 5 years ago

Closed 21 months ago

Last modified 21 months 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


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 5 years ago.

Download all attachments as: .zip

Change History (14)

Changed 5 years ago by magneto

comment:1 Changed 5 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:2 Changed 5 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

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

comment:3 Changed 5 years ago by mtredinnick

  • Triage Stage changed from Design decision needed to Accepted

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 5 years ago by thejaswi_puthraya

  • Component changed from Uncategorized to HTTP handling

comment:5 Changed 4 years ago by yozh

  • Cc yozh added

comment:6 Changed 4 years ago by yozh

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

comment:7 Changed 3 years ago by julien

  • Needs tests set
  • Severity set to Normal
  • Type set to Uncategorized

comment:8 Changed 3 years ago by lukeplant

  • Type changed from Uncategorized to Bug

comment:9 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:10 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:11 Changed 21 months ago by dgouldin

Looks like a duplicate of #16494.

comment:12 Changed 21 months ago by anonymous

  • Resolution set to duplicate
  • Status changed from new to closed

Agreed, this has been fixed in that other ticket.

comment:13 Changed 21 months ago by julien

Sorry that was me :)

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.