You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Hi, i am using fastapi to deploy my backend, and using this repo to help my api code create.
i found a problem when fastapi work with this repo, fastapi will split the Response().status with ' ', like:
status_code_string, _=status.split(" ", 1)
then i watch the source code with flask, it will make confuse with '500' and 500.
the Response().status setter look like this:
classBaseResponse(object):
@propertydefstatus_code(self):
"""The HTTP status code as a number."""returnself._status_code@status_code.setterdefstatus_code(self, code):
self._status_code=codetry:
self._status="%d %s"% (code, HTTP_STATUS_CODES[code].upper())
exceptKeyError:
self._status="%d UNKNOWN"%code@propertydefstatus(self):
"""The HTTP status code as a string."""returnself._status@status.setterdefstatus(self, value):
try:
self._status=to_native(value)
exceptAttributeError:
raiseTypeError("Invalid status argument")
try:
self._status_code=int(self._status.split(None, 1)[0])
exceptValueError:
self._status_code=0self._status="0 %s"%self._statusexceptIndexError:
raiseValueError("Empty status argument")
Hi, i am using fastapi to deploy my backend, and using this repo to help my api code create.
i found a problem when fastapi work with this repo, fastapi will split the Response().status with ' ', like:
then i watch the source code with flask, it will make confuse with '500' and 500.
the Response().status setter look like this: