Polishing contribution

Closes gh-26463
This commit is contained in:
Rossen Stoyanchev
2021-02-05 12:15:50 +00:00
parent a264013d7a
commit 8fb9796d1d
2 changed files with 27 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -80,16 +80,16 @@ class ContentDispositionTests {
.build());
}
@Test
void parseBase64EncodedUTF8Filename() {
assertThat(parse("attachment; filename=\"=?UTF-8?B?5pel5pys6KqeLmNzdg==?=\"").getFilename())
.isEqualTo("日本語.csv");
@Test // gh-26463
void parseBase64EncodedFilename() {
String input = "attachment; filename=\"=?UTF-8?B?5pel5pys6KqeLmNzdg==?=\"";
assertThat(parse(input).getFilename()).isEqualTo("日本語.csv");
}
@Test
@Test // gh-26463
void parseBase64EncodedShiftJISFilename() {
assertThat(parse("attachment; filename=\"=?SHIFT_JIS?B?k/qWe4zqLmNzdg==?=\"").getFilename())
.isEqualTo("日本語.csv");
String input = "attachment; filename=\"=?SHIFT_JIS?B?k/qWe4zqLmNzdg==?=\"";
assertThat(parse(input).getFilename()).isEqualTo("日本語.csv");
}
@Test