Merge ~troyanov/maas:fix-1990014 into maas:master
Proposed by
Anton Troyanov
Status: | Merged |
---|---|
Approved by: | Anton Troyanov |
Approved revision: | a55ae18a9ea56201cebd772e0a140c0a39ec481b |
Merge reported by: | MAAS Lander |
Merged at revision: | not available |
Proposed branch: | ~troyanov/maas:fix-1990014 |
Merge into: | maas:master |
Diff against target: |
13 lines (+1/-1) 1 file modified
src/maasserver/middleware.py (+1/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
MAAS Lander | Approve | ||
Christian Grabowski | Approve | ||
Review via email: mp+430049@code.launchpad.net |
Commit message
LP:1990014 fix debug middleware
When response jas no `content` attribute, default value will be
returned.
Default value should be of type `bytes`, not `str`, otherwise it will
fail to decode with an exception:
```
AttributeError: 'str' object has no attribute 'decode'.
```
From Django documentation:
HttpResponse.
A bytestring representing the content, encoded from a string if necessary.
To post a comment you must log in.
+1