Explorar el Código

response 413 when package reach max size

walkor hace 4 años
padre
commit
90f9e654b9
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      Protocols/Http.php

+ 4 - 0
Protocols/Http.php

@@ -145,6 +145,10 @@ class Http
                     unset($input[key($input)]);
                 }
             }
+            if ($length > $connection->maxPackageSize) {
+                $connection->close("HTTP/1.1 413 Request Entity Too Large\r\n\r\n");
+                return 0;
+            }
             return $length;
         }