Merge pull request #19160 from ktoso/wip-fallback-for-wildcard-port

=htc #19159 Adds falback for wildcard charset with decimal priority
This commit is contained in:
Konrad Malawski 2015-12-13 23:43:52 +00:00
commit bb0ac6161b

View file

@ -96,6 +96,11 @@ class ContentNegotiationSpec extends FreeSpec with Matchers {
accept(`text/plain` withCharset `UTF-16`) should reject
}
"Accept-Charset: *;q=0.1" test { accept
accept(`text/plain`) should select(`text/plain` withCharset `UTF-8`)
accept(`image/gif`) should select(`image/gif`)
}
"Accept-Charset: us;q=0.1,*;q=0" test { accept
accept(`text/plain`) should select(`text/plain` withCharset `US-ASCII`)
accept(`text/plain` withCharset `UTF-8`) should reject
@ -171,4 +176,5 @@ class ContentNegotiationSpec extends FreeSpec with Matchers {
testHeaders(headers: _*)(accept body(accept))
}
}
}
}