Commit 4a81e4a2 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

[-bug] Comments in HTTP Accept-Language field should be omitted.

parent 531b497c
......@@ -229,6 +229,9 @@ sub implicated_langs {
sub parse_http_accept_string {
my $accept_string = shift || '';
# Strip comments.
1 while $accept_string =~ s/\s*[(][^()]*[)]\s*/ /g;
$accept_string =~ s/^\s+//;
$accept_string =~ s/\s+$//;
$accept_string ||= '*';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment