@@ -32,10 +32,10 @@ class TestHeaderIndexing(object):
32
32
the appropriate hpack data structures.
33
33
"""
34
34
example_request_headers = [
35
- HeaderTuple (u ':authority' , u 'example.com' ),
36
- HeaderTuple (u ':path' , u '/' ),
37
- HeaderTuple (u ':scheme' , u 'https' ),
38
- HeaderTuple (u ':method' , u 'GET' ),
35
+ HeaderTuple (':authority' , 'example.com' ),
36
+ HeaderTuple (':path' , '/' ),
37
+ HeaderTuple (':scheme' , 'https' ),
38
+ HeaderTuple (':method' , 'GET' ),
39
39
]
40
40
bytes_example_request_headers = [
41
41
HeaderTuple (b':authority' , b'example.com' ),
@@ -45,11 +45,11 @@ class TestHeaderIndexing(object):
45
45
]
46
46
47
47
extended_request_headers = [
48
- HeaderTuple (u ':authority' , u 'example.com' ),
49
- HeaderTuple (u ':path' , u '/' ),
50
- HeaderTuple (u ':scheme' , u 'https' ),
51
- HeaderTuple (u ':method' , u 'GET' ),
52
- NeverIndexedHeaderTuple (u 'authorization' , u 'realpassword' ),
48
+ HeaderTuple (':authority' , 'example.com' ),
49
+ HeaderTuple (':path' , '/' ),
50
+ HeaderTuple (':scheme' , 'https' ),
51
+ HeaderTuple (':method' , 'GET' ),
52
+ NeverIndexedHeaderTuple ('authorization' , 'realpassword' ),
53
53
]
54
54
bytes_extended_request_headers = [
55
55
HeaderTuple (b':authority' , b'example.com' ),
@@ -60,18 +60,18 @@ class TestHeaderIndexing(object):
60
60
]
61
61
62
62
example_response_headers = [
63
- HeaderTuple (u ':status' , u '200' ),
64
- HeaderTuple (u 'server' , u 'fake-serv/0.1.0' )
63
+ HeaderTuple (':status' , '200' ),
64
+ HeaderTuple ('server' , 'fake-serv/0.1.0' )
65
65
]
66
66
bytes_example_response_headers = [
67
67
HeaderTuple (b':status' , b'200' ),
68
68
HeaderTuple (b'server' , b'fake-serv/0.1.0' )
69
69
]
70
70
71
71
extended_response_headers = [
72
- HeaderTuple (u ':status' , u '200' ),
73
- HeaderTuple (u 'server' , u 'fake-serv/0.1.0' ),
74
- NeverIndexedHeaderTuple (u 'secure' , u 'you-bet' ),
72
+ HeaderTuple (':status' , '200' ),
73
+ HeaderTuple ('server' , 'fake-serv/0.1.0' ),
74
+ NeverIndexedHeaderTuple ('secure' , 'you-bet' ),
75
75
]
76
76
bytes_extended_response_headers = [
77
77
HeaderTuple (b':status' , b'200' ),
@@ -228,7 +228,7 @@ def test_header_tuples_are_decoded_info_response(self,
228
228
# to avoid breaking the example headers.
229
229
headers = headers [:]
230
230
if encoding :
231
- headers [0 ] = HeaderTuple (u ':status' , u '100' )
231
+ headers [0 ] = HeaderTuple (':status' , '100' )
232
232
else :
233
233
headers [0 ] = HeaderTuple (b':status' , b'100' )
234
234
@@ -334,10 +334,10 @@ class TestSecureHeaders(object):
334
334
Certain headers should always be transformed to their never-indexed form.
335
335
"""
336
336
example_request_headers = [
337
- (u ':authority' , u 'example.com' ),
338
- (u ':path' , u '/' ),
339
- (u ':scheme' , u 'https' ),
340
- (u ':method' , u 'GET' ),
337
+ (':authority' , 'example.com' ),
338
+ (':path' , '/' ),
339
+ (':scheme' , 'https' ),
340
+ (':method' , 'GET' ),
341
341
]
342
342
bytes_example_request_headers = [
343
343
(b':authority' , b'example.com' ),
@@ -346,15 +346,15 @@ class TestSecureHeaders(object):
346
346
(b':method' , b'GET' ),
347
347
]
348
348
possible_auth_headers = [
349
- (u 'authorization' , u 'test' ),
350
- (u 'Authorization' , u 'test' ),
351
- (u 'authorization' , u 'really long test' ),
352
- HeaderTuple (u 'authorization' , u 'test' ),
353
- HeaderTuple (u 'Authorization' , u 'test' ),
354
- HeaderTuple (u 'authorization' , u 'really long test' ),
355
- NeverIndexedHeaderTuple (u 'authorization' , u 'test' ),
356
- NeverIndexedHeaderTuple (u 'Authorization' , u 'test' ),
357
- NeverIndexedHeaderTuple (u 'authorization' , u 'really long test' ),
349
+ ('authorization' , 'test' ),
350
+ ('Authorization' , 'test' ),
351
+ ('authorization' , 'really long test' ),
352
+ HeaderTuple ('authorization' , 'test' ),
353
+ HeaderTuple ('Authorization' , 'test' ),
354
+ HeaderTuple ('authorization' , 'really long test' ),
355
+ NeverIndexedHeaderTuple ('authorization' , 'test' ),
356
+ NeverIndexedHeaderTuple ('Authorization' , 'test' ),
357
+ NeverIndexedHeaderTuple ('authorization' , 'really long test' ),
358
358
(b'authorization' , b'test' ),
359
359
(b'Authorization' , b'test' ),
360
360
(b'authorization' , b'really long test' ),
@@ -364,15 +364,15 @@ class TestSecureHeaders(object):
364
364
NeverIndexedHeaderTuple (b'authorization' , b'test' ),
365
365
NeverIndexedHeaderTuple (b'Authorization' , b'test' ),
366
366
NeverIndexedHeaderTuple (b'authorization' , b'really long test' ),
367
- (u 'proxy-authorization' , u 'test' ),
368
- (u 'Proxy-Authorization' , u 'test' ),
369
- (u 'proxy-authorization' , u 'really long test' ),
370
- HeaderTuple (u 'proxy-authorization' , u 'test' ),
371
- HeaderTuple (u 'Proxy-Authorization' , u 'test' ),
372
- HeaderTuple (u 'proxy-authorization' , u 'really long test' ),
373
- NeverIndexedHeaderTuple (u 'proxy-authorization' , u 'test' ),
374
- NeverIndexedHeaderTuple (u 'Proxy-Authorization' , u 'test' ),
375
- NeverIndexedHeaderTuple (u 'proxy-authorization' , u 'really long test' ),
367
+ ('proxy-authorization' , 'test' ),
368
+ ('Proxy-Authorization' , 'test' ),
369
+ ('proxy-authorization' , 'really long test' ),
370
+ HeaderTuple ('proxy-authorization' , 'test' ),
371
+ HeaderTuple ('Proxy-Authorization' , 'test' ),
372
+ HeaderTuple ('proxy-authorization' , 'really long test' ),
373
+ NeverIndexedHeaderTuple ('proxy-authorization' , 'test' ),
374
+ NeverIndexedHeaderTuple ('Proxy-Authorization' , 'test' ),
375
+ NeverIndexedHeaderTuple ('proxy-authorization' , 'really long test' ),
376
376
(b'proxy-authorization' , b'test' ),
377
377
(b'Proxy-Authorization' , b'test' ),
378
378
(b'proxy-authorization' , b'really long test' ),
@@ -384,16 +384,16 @@ class TestSecureHeaders(object):
384
384
NeverIndexedHeaderTuple (b'proxy-authorization' , b'really long test' ),
385
385
]
386
386
secured_cookie_headers = [
387
- (u 'cookie' , u 'short' ),
388
- (u 'Cookie' , u 'short' ),
389
- (u 'cookie' , u 'nineteen byte cooki' ),
390
- HeaderTuple (u 'cookie' , u 'short' ),
391
- HeaderTuple (u 'Cookie' , u 'short' ),
392
- HeaderTuple (u 'cookie' , u 'nineteen byte cooki' ),
393
- NeverIndexedHeaderTuple (u 'cookie' , u 'short' ),
394
- NeverIndexedHeaderTuple (u 'Cookie' , u 'short' ),
395
- NeverIndexedHeaderTuple (u 'cookie' , u 'nineteen byte cooki' ),
396
- NeverIndexedHeaderTuple (u 'cookie' , u 'longer manually secured cookie' ),
387
+ ('cookie' , 'short' ),
388
+ ('Cookie' , 'short' ),
389
+ ('cookie' , 'nineteen byte cooki' ),
390
+ HeaderTuple ('cookie' , 'short' ),
391
+ HeaderTuple ('Cookie' , 'short' ),
392
+ HeaderTuple ('cookie' , 'nineteen byte cooki' ),
393
+ NeverIndexedHeaderTuple ('cookie' , 'short' ),
394
+ NeverIndexedHeaderTuple ('Cookie' , 'short' ),
395
+ NeverIndexedHeaderTuple ('cookie' , 'nineteen byte cooki' ),
396
+ NeverIndexedHeaderTuple ('cookie' , 'longer manually secured cookie' ),
397
397
(b'cookie' , b'short' ),
398
398
(b'Cookie' , b'short' ),
399
399
(b'cookie' , b'nineteen byte cooki' ),
@@ -406,12 +406,12 @@ class TestSecureHeaders(object):
406
406
NeverIndexedHeaderTuple (b'cookie' , b'longer manually secured cookie' ),
407
407
]
408
408
unsecured_cookie_headers = [
409
- (u 'cookie' , u 'twenty byte cookie!!' ),
410
- (u 'Cookie' , u 'twenty byte cookie!!' ),
411
- (u 'cookie' , u 'substantially longer than 20 byte cookie' ),
412
- HeaderTuple (u 'cookie' , u 'twenty byte cookie!!' ),
413
- HeaderTuple (u 'cookie' , u 'twenty byte cookie!!' ),
414
- HeaderTuple (u 'Cookie' , u 'twenty byte cookie!!' ),
409
+ ('cookie' , 'twenty byte cookie!!' ),
410
+ ('Cookie' , 'twenty byte cookie!!' ),
411
+ ('cookie' , 'substantially longer than 20 byte cookie' ),
412
+ HeaderTuple ('cookie' , 'twenty byte cookie!!' ),
413
+ HeaderTuple ('cookie' , 'twenty byte cookie!!' ),
414
+ HeaderTuple ('Cookie' , 'twenty byte cookie!!' ),
415
415
(b'cookie' , b'twenty byte cookie!!' ),
416
416
(b'Cookie' , b'twenty byte cookie!!' ),
417
417
(b'cookie' , b'substantially longer than 20 byte cookie' ),
0 commit comments