Unverified Commit f27897ba authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #1152 from ikedas/accept-language by ikedas

[-bug] Comments in HTTP Accept-Language field should be omitted
parents 71d1c9e5 4a81e4a2
......@@ -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