Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multipart filename support RFC6266 without language #4943

Draft
wants to merge 1 commit into
base: 2.x
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@

package org.glassfish.jersey.tests.api;

import java.text.ParseException;
import java.util.Date;

import org.glassfish.jersey.media.multipart.ContentDisposition;
import org.glassfish.jersey.message.internal.HttpDateFormat;
import org.glassfish.jersey.message.internal.HttpHeaderReader;

import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import java.text.ParseException;
import java.util.Date;

import static org.junit.Assert.*;


/**
Expand Down Expand Up @@ -221,6 +218,11 @@ public void testFileNameExt() {
}
}

@Test
public void rfc6266WithoutLanguage() throws ParseException {
assertFileNameExt("myfile.txt", "myfile.txt", "utf-8''myfile.txt");
}

private void assertFileNameExt(
final String expectedFileName,
final String actualFileName,
Expand Down