@@ -32,10 +32,10 @@ class TestHeaderIndexing(object):
3232 the appropriate hpack data structures.
3333 """
3434 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' ),
3939 ]
4040 bytes_example_request_headers = [
4141 HeaderTuple (b':authority' , b'example.com' ),
@@ -45,11 +45,11 @@ class TestHeaderIndexing(object):
4545 ]
4646
4747 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' ),
5353 ]
5454 bytes_extended_request_headers = [
5555 HeaderTuple (b':authority' , b'example.com' ),
@@ -60,18 +60,18 @@ class TestHeaderIndexing(object):
6060 ]
6161
6262 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' )
6565 ]
6666 bytes_example_response_headers = [
6767 HeaderTuple (b':status' , b'200' ),
6868 HeaderTuple (b'server' , b'fake-serv/0.1.0' )
6969 ]
7070
7171 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' ),
7575 ]
7676 bytes_extended_response_headers = [
7777 HeaderTuple (b':status' , b'200' ),
@@ -228,7 +228,7 @@ def test_header_tuples_are_decoded_info_response(self,
228228 # to avoid breaking the example headers.
229229 headers = headers [:]
230230 if encoding :
231- headers [0 ] = HeaderTuple (u ':status' , u '100' )
231+ headers [0 ] = HeaderTuple (':status' , '100' )
232232 else :
233233 headers [0 ] = HeaderTuple (b':status' , b'100' )
234234
@@ -334,10 +334,10 @@ class TestSecureHeaders(object):
334334 Certain headers should always be transformed to their never-indexed form.
335335 """
336336 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' ),
341341 ]
342342 bytes_example_request_headers = [
343343 (b':authority' , b'example.com' ),
@@ -346,15 +346,15 @@ class TestSecureHeaders(object):
346346 (b':method' , b'GET' ),
347347 ]
348348 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' ),
358358 (b'authorization' , b'test' ),
359359 (b'Authorization' , b'test' ),
360360 (b'authorization' , b'really long test' ),
@@ -364,15 +364,15 @@ class TestSecureHeaders(object):
364364 NeverIndexedHeaderTuple (b'authorization' , b'test' ),
365365 NeverIndexedHeaderTuple (b'Authorization' , b'test' ),
366366 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' ),
376376 (b'proxy-authorization' , b'test' ),
377377 (b'Proxy-Authorization' , b'test' ),
378378 (b'proxy-authorization' , b'really long test' ),
@@ -384,16 +384,16 @@ class TestSecureHeaders(object):
384384 NeverIndexedHeaderTuple (b'proxy-authorization' , b'really long test' ),
385385 ]
386386 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' ),
397397 (b'cookie' , b'short' ),
398398 (b'Cookie' , b'short' ),
399399 (b'cookie' , b'nineteen byte cooki' ),
@@ -406,12 +406,12 @@ class TestSecureHeaders(object):
406406 NeverIndexedHeaderTuple (b'cookie' , b'longer manually secured cookie' ),
407407 ]
408408 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!!' ),
415415 (b'cookie' , b'twenty byte cookie!!' ),
416416 (b'Cookie' , b'twenty byte cookie!!' ),
417417 (b'cookie' , b'substantially longer than 20 byte cookie' ),
0 commit comments