@@ -61,7 +61,7 @@ public function homeAction()
61
61
{
62
62
$ this ->profiler ->disable ();
63
63
64
- return new RedirectResponse ($ this ->generator ->generate ('_profiler_search_results ' , array ('token ' => 'empty ' , 'limit ' => 10 )));
64
+ return new RedirectResponse ($ this ->generator ->generate ('_profiler_search_results ' , array ('token ' => 'empty ' , 'limit ' => 10 )), 302 , array ( ' Content-Type ' => ' text/html ' ) );
65
65
}
66
66
67
67
/**
@@ -82,7 +82,7 @@ public function panelAction(Request $request, $token)
82
82
$ page = $ request ->query ->get ('page ' , 'home ' );
83
83
84
84
if (!$ profile = $ this ->profiler ->loadProfile ($ token )) {
85
- return new Response ($ this ->twig ->render ('@WebProfiler/Profiler/info.html.twig ' , array ('about ' => 'no_token ' , 'token ' => $ token )));
85
+ return new Response ($ this ->twig ->render ('@WebProfiler/Profiler/info.html.twig ' , array ('about ' => 'no_token ' , 'token ' => $ token )), 200 , array ( ' Content-Type ' => ' text/html ' ) );
86
86
}
87
87
88
88
if (!$ profile ->hasCollector ($ panel )) {
@@ -98,7 +98,7 @@ public function panelAction(Request $request, $token)
98
98
'request ' => $ request ,
99
99
'templates ' => $ this ->getTemplateManager ()->getTemplates ($ profile ),
100
100
'is_ajax ' => $ request ->isXmlHttpRequest (),
101
- )));
101
+ )), 200 , array ( ' Content-Type ' => ' text/html ' ) );
102
102
}
103
103
104
104
/**
@@ -134,7 +134,7 @@ public function purgeAction()
134
134
$ this ->profiler ->disable ();
135
135
$ this ->profiler ->purge ();
136
136
137
- return new RedirectResponse ($ this ->generator ->generate ('_profiler_info ' , array ('about ' => 'purge ' )));
137
+ return new RedirectResponse ($ this ->generator ->generate ('_profiler_info ' , array ('about ' => 'purge ' )), 302 , array ( ' Content-Type ' => ' text/html ' ) );
138
138
}
139
139
140
140
/**
@@ -151,14 +151,14 @@ public function importAction(Request $request)
151
151
$ file = $ request ->files ->get ('file ' );
152
152
153
153
if (empty ($ file ) || !$ file ->isValid ()) {
154
- return new RedirectResponse ($ this ->generator ->generate ('_profiler_info ' , array ('about ' => 'upload_error ' )));
154
+ return new RedirectResponse ($ this ->generator ->generate ('_profiler_info ' , array ('about ' => 'upload_error ' )), 302 , array ( ' Content-Type ' => ' text/html ' ) );
155
155
}
156
156
157
157
if (!$ profile = $ this ->profiler ->import (file_get_contents ($ file ->getPathname ()))) {
158
- return new RedirectResponse ($ this ->generator ->generate ('_profiler_info ' , array ('about ' => 'already_exists ' )));
158
+ return new RedirectResponse ($ this ->generator ->generate ('_profiler_info ' , array ('about ' => 'already_exists ' )), 302 , array ( ' Content-Type ' => ' text/html ' ) );
159
159
}
160
160
161
- return new RedirectResponse ($ this ->generator ->generate ('_profiler ' , array ('token ' => $ profile ->getToken ())));
161
+ return new RedirectResponse ($ this ->generator ->generate ('_profiler ' , array ('token ' => $ profile ->getToken ())), 302 , array ( ' Content-Type ' => ' text/html ' ) );
162
162
}
163
163
164
164
/**
@@ -174,7 +174,7 @@ public function infoAction($about)
174
174
175
175
return new Response ($ this ->twig ->render ('@WebProfiler/Profiler/info.html.twig ' , array (
176
176
'about ' => $ about
177
- )));
177
+ )), 200 , array ( ' Content-Type ' => ' text/html ' ) );
178
178
}
179
179
180
180
/**
@@ -195,13 +195,13 @@ public function toolbarAction(Request $request, $token)
195
195
}
196
196
197
197
if (null === $ token ) {
198
- return new Response ();
198
+ return new Response ('' , 200 , array ( ' Content-Type ' => ' text/html ' ) );
199
199
}
200
200
201
201
$ this ->profiler ->disable ();
202
202
203
203
if (!$ profile = $ this ->profiler ->loadProfile ($ token )) {
204
- return new Response ();
204
+ return new Response ('' , 200 , array ( ' Content-Type ' => ' text/html ' ) );
205
205
}
206
206
207
207
// the toolbar position (top, bottom, normal, or null -- use the configuration)
@@ -222,7 +222,7 @@ public function toolbarAction(Request $request, $token)
222
222
'templates ' => $ this ->getTemplateManager ()->getTemplates ($ profile ),
223
223
'profiler_url ' => $ url ,
224
224
'token ' => $ token ,
225
- )));
225
+ )), 200 , array ( ' Content-Type ' => ' text/html ' ) );
226
226
}
227
227
228
228
/**
@@ -262,7 +262,7 @@ public function searchBarAction(Request $request)
262
262
'start ' => $ start ,
263
263
'end ' => $ end ,
264
264
'limit ' => $ limit ,
265
- )));
265
+ )), 200 , array ( ' Content-Type ' => ' text/html ' ) );
266
266
}
267
267
268
268
/**
@@ -297,7 +297,7 @@ public function searchResultsAction(Request $request, $token)
297
297
'end ' => $ end ,
298
298
'limit ' => $ limit ,
299
299
'panel ' => null ,
300
- )));
300
+ )), 200 , array ( ' Content-Type ' => ' text/html ' ) );
301
301
}
302
302
303
303
/**
@@ -330,7 +330,7 @@ public function searchAction(Request $request)
330
330
}
331
331
332
332
if (!empty ($ token )) {
333
- return new RedirectResponse ($ this ->generator ->generate ('_profiler ' , array ('token ' => $ token )));
333
+ return new RedirectResponse ($ this ->generator ->generate ('_profiler ' , array ('token ' => $ token )), 302 , array ( ' Content-Type ' => ' text/html ' ) );
334
334
}
335
335
336
336
$ tokens = $ this ->profiler ->find ($ ip , $ url , $ limit , $ method , $ start , $ end );
@@ -343,7 +343,7 @@ public function searchAction(Request $request)
343
343
'start ' => $ start ,
344
344
'end ' => $ end ,
345
345
'limit ' => $ limit ,
346
- )));
346
+ )), 302 , array ( ' Content-Type ' => ' text/html ' ) );
347
347
}
348
348
349
349
/**
@@ -359,7 +359,7 @@ public function phpinfoAction()
359
359
phpinfo ();
360
360
$ phpinfo = ob_get_clean ();
361
361
362
- return new Response ($ phpinfo );
362
+ return new Response ($ phpinfo, 200 , array ( ' Content-Type ' => ' text/html ' ) );
363
363
}
364
364
365
365
/**
0 commit comments