Opened 7 years ago

Closed 7 years ago

#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


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

Change History (1)

comment:1 Changed 7 years ago by dballanc@…

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top