@@ -44,12 +44,12 @@ def get(self):
44
44
self .set_header ("Content-Length" , self .get_argument ("value" ))
45
45
self .write ("ok" )
46
46
47
- class PRGPostHandler (RequestHandler ):
47
+ class SeeOther303PostHandler (RequestHandler ):
48
48
def post (self ):
49
- self .set_header ("Location" , "/prg_get " )
49
+ self .set_header ("Location" , "/303_get " )
50
50
self .set_status (303 )
51
51
52
- class PRGGetHandler (RequestHandler ):
52
+ class SeeOther303GetHandler (RequestHandler ):
53
53
def get (self ):
54
54
self .write ("ok" )
55
55
@@ -66,8 +66,8 @@ def get_app(self):
66
66
url ("/hang" , HangHandler ),
67
67
url ("/hello" , HelloWorldHandler ),
68
68
url ("/content_length" , ContentLengthHandler ),
69
- url ("/prg_post " , PRGPostHandler ),
70
- url ("/prg_get " , PRGGetHandler ),
69
+ url ("/303_post " , SeeOther303PostHandler ),
70
+ url ("/303_get " , SeeOther303GetHandler ),
71
71
], gzip = True )
72
72
73
73
def test_singleton (self ):
@@ -147,10 +147,10 @@ def test_max_redirects(self):
147
147
self .assertTrue (response .headers ["Location" ].endswith ("/countdown/1" ))
148
148
149
149
def test_303_redirect (self ):
150
- response = self .fetch ("/prg_post " , method = "POST" , body = "" )
150
+ response = self .fetch ("/303_post " , method = "POST" , body = "" )
151
151
self .assertEqual (200 , response .code )
152
- self .assertTrue (response .request .url .endswith ("/prg_post " ))
153
- self .assertTrue (response .effective_url .endswith ("/prg_get " ))
152
+ self .assertTrue (response .request .url .endswith ("/303_post " ))
153
+ self .assertTrue (response .effective_url .endswith ("/303_get " ))
154
154
#request is the original request, is a POST still
155
155
self .assertEqual ("POST" , response .request .method )
156
156
0 commit comments