Code

#18797 closed Bug (invalid)

HttpResponse status_code does not appear to be thread safe

Reported by: dballanc@… Owned by: nobody
Component: HTTP handling Version: 1.4
Severity: Normal Keywords: status code thread safe httpresponse
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The status_code attribute is defined as part of the class, but later is assigned to in init. I'm not sure how to correct without breaking backwards compatibility.

class HttpResponse(object):
    status_code = 200

    def __init__(self, content='', mimetype=None, status=None, content_type=None):
        #... snip...
        if status:
            self.status_code = status

Attachments (0)

Change History (1)

comment:1 Changed 20 months ago by dballanc@…

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.