Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 25... Línea 25...
25
 
25
 
26
    /**
26
    /**
27
     * @var array
27
     * @var array
28
     */
28
     */
29
    public static $defaultSettings = [
29
    public static $defaultSettings = [
30
        'max'             => 5,
30
        'max' => 5,
31
        'protocols'       => ['http', 'https'],
31
        'protocols' => ['http', 'https'],
32
        'strict'          => false,
32
        'strict' => false,
33
        'referer'         => false,
33
        'referer' => false,
34
        'track_redirects' => false,
34
        'track_redirects' => false,
Línea 35... Línea 35...
35
    ];
35
    ];
36
 
36
 
Línea 164... Línea 164...
164
 
164
 
165
        // Use a GET request if this is an entity enclosing request and we are
165
        // Use a GET request if this is an entity enclosing request and we are
166
        // not forcing RFC compliance, but rather emulating what all browsers
166
        // not forcing RFC compliance, but rather emulating what all browsers
167
        // would do.
167
        // would do.
168
        $statusCode = $response->getStatusCode();
168
        $statusCode = $response->getStatusCode();
169
        if ($statusCode == 303 ||
169
        if ($statusCode == 303
170
            ($statusCode <= 302 && !$options['allow_redirects']['strict'])
170
            || ($statusCode <= 302 && !$options['allow_redirects']['strict'])
171
        ) {
171
        ) {
172
            $safeMethods = ['GET', 'HEAD', 'OPTIONS'];
172
            $safeMethods = ['GET', 'HEAD', 'OPTIONS'];
Línea 173... Línea 173...
173
            $requestMethod = $request->getMethod();
173
            $requestMethod = $request->getMethod();