forked from orbit-oss/flask
Merge pull request #938 from ahlen/response-with-headers-without-status
Enable tuple responses with headers without status
This commit is contained in:
commit
c9bf907037
3 changed files with 47 additions and 12 deletions
|
|
@ -676,9 +676,9 @@ converting return values into response objects is as follows:
|
|||
default parameters.
|
||||
3. If a tuple is returned the items in the tuple can provide extra
|
||||
information. Such tuples have to be in the form ``(response, status,
|
||||
headers)`` where at least one item has to be in the tuple. The
|
||||
`status` value will override the status code and `headers` can be a
|
||||
list or dictionary of additional header values.
|
||||
headers)`` or ``(response, headers)`` where at least one item has
|
||||
to be in the tuple. The `status` value will override the status code
|
||||
and `headers` can be a list or dictionary of additional header values.
|
||||
4. If none of that works, Flask will assume the return value is a
|
||||
valid WSGI application and convert that into a response object.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue