Commit b671eaa
committed
Return None from Context.headers when the request object has no headers
A custom request type on the request context is not required to expose
headers; reading them through a blind cast raised AttributeError. Use
getattr with a None fallback and drop the now-unused protocol.1 parent 2f8b657 commit b671eaa
2 files changed
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 25 | | |
31 | 26 | | |
32 | 27 | | |
| |||
226 | 221 | | |
227 | 222 | | |
228 | 223 | | |
229 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
230 | 227 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
| 228 | + | |
235 | 229 | | |
236 | 230 | | |
237 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1823 | 1823 | | |
1824 | 1824 | | |
1825 | 1825 | | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
1826 | 1832 | | |
1827 | 1833 | | |
1828 | 1834 | | |
| |||
0 commit comments