Browse Source

Remove detector for Flash.

It's pretty much dead now.
ADmad 6 years ago
parent
commit
20ca5a033c
2 changed files with 1 additions and 8 deletions
  1. 0 1
      src/Http/ServerRequest.php
  2. 1 7
      tests/TestCase/Http/ServerRequestTest.php

+ 0 - 1
src/Http/ServerRequest.php

@@ -134,7 +134,6 @@ class ServerRequest implements ServerRequestInterface
         'options' => ['env' => 'REQUEST_METHOD', 'value' => 'OPTIONS'],
         'ssl' => ['env' => 'HTTPS', 'options' => [1, 'on']],
         'ajax' => ['env' => 'HTTP_X_REQUESTED_WITH', 'value' => 'XMLHttpRequest'],
-        'flash' => ['env' => 'HTTP_USER_AGENT', 'pattern' => '/^(Shockwave|Adobe) Flash/'],
         'json' => ['accept' => ['application/json'], 'param' => '_ext', 'value' => 'json'],
         'xml' => ['accept' => ['application/xml', 'text/xml'], 'param' => '_ext', 'value' => 'xml'],
     ];

+ 1 - 7
tests/TestCase/Http/ServerRequestTest.php

@@ -1248,16 +1248,10 @@ class ServerRequestTest extends TestCase
      *
      * @return void
      */
-    public function testisAjaxFlashAndFriends()
+    public function testisAjax()
     {
         $request = new ServerRequest();
 
-        $request = $request->withEnv('HTTP_USER_AGENT', 'Shockwave Flash');
-        $this->assertTrue($request->is('flash'));
-
-        $request = $request->withEnv('HTTP_USER_AGENT', 'Adobe Flash');
-        $this->assertTrue($request->is('flash'));
-
         $request = $request->withEnv('HTTP_X_REQUESTED_WITH', 'XMLHttpRequest');
         $this->assertTrue($request->is('ajax'));