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 44 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
55 xsi : schemaLocation =" http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd" >
66
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" >
89 <default key =" _controller" >web_profiler.controller.profiler::toolbarStylesheetAction</default >
910 </route >
1011
Original file line number Diff line number Diff line change @@ -164,6 +164,20 @@ public function testToolbarStylesheetAction()
164164 $ this ->assertSame ('max-age=600, private ' , $ response ->headers ->get ('Cache-Control ' ));
165165 }
166166
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+
167181 public static function getEmptyTokenCases ()
168182 {
169183 return [
You can’t perform that action at this time.
0 commit comments