Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 1464
Zeile 222... Zeile 222...
222
                'Header name must be a string but %s provided.',
222
                'Header name must be a string but %s provided.',
223
                is_object($header) ? get_class($header) : gettype($header)
223
                is_object($header) ? get_class($header) : gettype($header)
224
            ));
224
            ));
225
        }
225
        }
Zeile 226... Zeile 226...
226
 
226
 
227
        if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $header)) {
227
        if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) {
228
            throw new \InvalidArgumentException(
-
 
229
                sprintf(
228
            throw new \InvalidArgumentException(
230
                    '"%s" is not valid header name',
-
 
231
                    $header
-
 
232
                )
229
                sprintf('"%s" is not valid header name.', $header)
233
            );
230
            );
234
        }
231
        }
Zeile 235... Zeile 232...
235
    }
232
    }
Zeile 255... Zeile 252...
255
        // within the message/http media type.
252
        // within the message/http media type.
256
        //
253
        //
257
        // Clients must not send a request with line folding and a server sending folded headers is
254
        // Clients must not send a request with line folding and a server sending folded headers is
258
        // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting
255
        // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting
259
        // folding is not likely to break any legitimate use case.
256
        // folding is not likely to break any legitimate use case.
260
        if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/', $value)) {
257
        if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) {
-
 
258
            throw new \InvalidArgumentException(
261
            throw new \InvalidArgumentException(sprintf('"%s" is not valid header value', $value));
259
                sprintf('"%s" is not valid header value.', $value)
-
 
260
            );
262
        }
261
        }
263
    }
262
    }
264
}
263
}