=htp #17985 fix content negotiation assuming charsetRanges being List in pattern match
(cherry picked from commit 76cc4d890c3b7ea3a5510656520c20b165090adb)
This commit is contained in:
parent
e3ae7abb3b
commit
5ba7918cd9
3 changed files with 9 additions and 1 deletions
|
|
@ -53,6 +53,13 @@ class ContentNegotiationSpec extends FreeSpec with Matchers {
|
|||
accept(`text/plain` withCharset `UTF-8`) should reject
|
||||
}
|
||||
|
||||
"manually created Accept-Charset: UTF-16" in testHeaders(headers.`Accept-Charset`(Vector(HttpCharsets.`UTF-16`.toRange))) { accept ⇒
|
||||
accept(`text/plain`) should select(`text/plain`, `UTF-16`)
|
||||
|
||||
// FIXME: reenable, currently fails because of #17984
|
||||
// accept(`text/plain` withCharset `UTF-8`) should reject
|
||||
}
|
||||
|
||||
"Accept-Charset: UTF-16, UTF-8" test { accept ⇒
|
||||
accept(`text/plain`) should select(`text/plain`, `UTF-8`)
|
||||
accept(`text/plain` withCharset `UTF-16`) should select(`text/plain`, `UTF-16`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue