File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,36 @@ def test_php_application_query_string_empty():
171
171
assert resp ['headers' ]['Query-String' ] == '' , 'query string empty'
172
172
173
173
174
+ def test_php_application_query_string_rewrite ():
175
+ assert 'success' in client .conf (
176
+ {
177
+ "listeners" : {"*:7080" : {"pass" : "routes" }},
178
+ "routes" : [
179
+ {
180
+ "action" : {
181
+ "rewrite" : "/new" ,
182
+ "pass" : "applications/query_string" ,
183
+ },
184
+ },
185
+ ],
186
+ "applications" : {
187
+ "query_string" : {
188
+ "type" : client .get_application_type (),
189
+ "processes" : {"spare" : 0 },
190
+ "root" : f"{ option .test_dir } /php/query_string" ,
191
+ "script" : "index.php" ,
192
+ }
193
+ },
194
+ },
195
+ )
196
+
197
+ assert client .get (url = '/old' )['status' ] == 200
198
+
199
+ resp = client .get (url = '/old?arg=val' )
200
+ assert resp ['status' ] == 200
201
+ assert resp ['headers' ]['Query-String' ] == 'arg=val'
202
+
203
+
174
204
def test_php_application_fastcgi_finish_request (findall , unit_pid ):
175
205
client .load ('fastcgi_finish_request' )
176
206
You can’t perform that action at this time.
0 commit comments