Skip to content

Commit f2e04a2

Browse files
committed
test: align by-handle Content-Disposition expectations with the vanilla ASCII fallback
The fallback transliterates (NFD + strip combining marks + drop non-ASCII), it does not substitute underscores. Two expectations in this file still assumed the old underscore output.
1 parent 90a4679 commit f2e04a2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

dspace-server-webapp/src/test/java/org/dspace/app/rest/BitstreamByHandleRestControllerIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,8 @@ public void downloadBitstreamByHandleCjkFilename() throws Exception {
512512
+ "/%E6%97%A5%E6%9C%AC%E8%AA%9E.txt")))
513513
.andExpect(status().isOk())
514514
.andExpect(header().string(HttpHeaders.CONTENT_DISPOSITION,
515-
// CJK chars replaced with _ in ASCII fallback; filename* has UTF-8 encoding
516-
equalTo("attachment; filename=\"___.txt\"; "
515+
// CJK has no ASCII decomposition, so it drops out of the fallback entirely
516+
equalTo("attachment; filename=\".txt\"; "
517517
+ "filename*=UTF-8''%E6%97%A5%E6%9C%AC%E8%AA%9E.txt")))
518518
.andExpect(content().string(bitstreamContent));
519519
}
@@ -592,7 +592,7 @@ public void downloadBitstreamByHandleComplexFilename() throws Exception {
592592
+ "/M%C3%A9di%C3%A1%20(%2B)%239)%20ano")))
593593
.andExpect(status().isOk())
594594
.andExpect(header().string(HttpHeaders.CONTENT_DISPOSITION,
595-
equalTo("attachment; filename=\"M_di_ (+)#9) ano\"; "
595+
equalTo("attachment; filename=\"Media (+)#9) ano\"; "
596596
+ "filename*=UTF-8''M%C3%A9di%C3%A1%20%28%2B%29%239%29%20ano")))
597597
.andExpect(content().string(bitstreamContent));
598598
}

0 commit comments

Comments
 (0)