Changeset 77:3454cb15a7dd
- Timestamp:
- 09/11/08 12:28:52
(4 months ago)
- Author:
- Allan Saddi <allan@saddi.com>
- branch:
- default
- Message:
Add an indication as to which header fails assertion when
passing in non-string header names and/or values.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r76 |
r77 |
|
| | 1 | 2008-09-11 Allan Saddi <allan@saddi.com> |
|---|
| | 2 | |
|---|
| | 3 | * Add an indication as to which header fails assertion when |
|---|
| | 4 | passing in non-string header names and/or values. |
|---|
| | 5 | |
|---|
| 1 | 6 | 2008-08-20 Allan Saddi <allan@saddi.com> |
|---|
| 2 | 7 | |
|---|
| r71 |
r77 |
|
| 887 | 887 | if __debug__: |
|---|
| 888 | 888 | for name,val in response_headers: |
|---|
| 889 | | assert type(name) is str, 'Header names must be strings' |
|---|
| 890 | | assert type(val) is str, 'Header values must be strings' |
|---|
| | 889 | assert type(name) is str, 'Header name "%s" must be a string' % name |
|---|
| | 890 | assert type(val) is str, 'Value of header "%s" must be a string' % name |
|---|
| 891 | 891 | |
|---|
| 892 | 892 | headers_set[:] = [status, response_headers] |
|---|
| r71 |
r77 |
|
| 1104 | 1104 | if __debug__: |
|---|
| 1105 | 1105 | for name,val in response_headers: |
|---|
| 1106 | | assert type(name) is str, 'Header names must be strings' |
|---|
| 1107 | | assert type(val) is str, 'Header values must be strings' |
|---|
| | 1106 | assert type(name) is str, 'Header name "%s" must be a string' % name |
|---|
| | 1107 | assert type(val) is str, 'Value of header "%s" must be a string' % name |
|---|
| 1108 | 1108 | |
|---|
| 1109 | 1109 | headers_set[:] = [status, response_headers] |
|---|
| r71 |
r77 |
|
| 444 | 444 | if __debug__: |
|---|
| 445 | 445 | for name,val in response_headers: |
|---|
| 446 | | assert type(name) is str, 'Header names must be strings' |
|---|
| 447 | | assert type(val) is str, 'Header values must be strings' |
|---|
| | 446 | assert type(name) is str, 'Header name "%s" must be a string' % name |
|---|
| | 447 | assert type(val) is str, 'Value of header "%s" must be a string' % name |
|---|
| 448 | 448 | |
|---|
| 449 | 449 | headers_set[:] = [status, response_headers] |
|---|