File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
src/Symfony/Bundle/WebProfilerBundle Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 4
4
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
5
xsi : schemaLocation =" http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd" >
6
6
7
- <route id =" _wdt_stylesheet" path =" /styles.css" >
7
+ <!-- Using a path like “…/styles.css” cause issues with some web servers which try to fetch the file, and fail to do it -->
8
+ <route id =" _wdt_stylesheet" path =" /styles-css" >
8
9
<default key =" _controller" >web_profiler.controller.profiler::toolbarStylesheetAction</default >
9
10
</route >
10
11
Original file line number Diff line number Diff line change @@ -164,6 +164,20 @@ public function testToolbarStylesheetAction()
164
164
$ this ->assertSame ('max-age=600, private ' , $ response ->headers ->get ('Cache-Control ' ));
165
165
}
166
166
167
+ public function testToolbarStylesheetActionFromPath ()
168
+ {
169
+ $ kernel = new WebProfilerBundleKernel ();
170
+ $ client = new KernelBrowser ($ kernel );
171
+
172
+ $ client ->request ('GET ' , '/_wdt/styles-css ' );
173
+
174
+ $ response = $ client ->getResponse ();
175
+
176
+ $ this ->assertSame (200 , $ response ->getStatusCode ());
177
+ $ this ->assertSame ('text/css; charset=UTF-8 ' , $ response ->headers ->get ('Content-Type ' ));
178
+ $ this ->assertSame ('max-age=600, private ' , $ response ->headers ->get ('Cache-Control ' ));
179
+ }
180
+
167
181
public static function getEmptyTokenCases ()
168
182
{
169
183
return [
You can’t perform that action at this time.
0 commit comments