ari-ban / issue-test

0 stars 0 forks source link

ISO-8859-1 response header becomes white space #1889

Closed arinban closed 7 years ago

arinban commented 7 years ago

ISO-8859-1 response header becomes white space.

ex) index.jsp

<%@ page session="false" contentType="text/html; charset=ISO-8859-1" %> 
<%
    String fname = new String("Â.txt");
    response.setHeader("Content-Disposition", "attachment; filename=\"" + fname + "\"");
%>
# telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
GET /iso88591download/index.jsp HTTP/1.1
Host: localhost

HTTP/1.1 200 OK
Content-Disposition: attachment; filename=" .txt"
Content-Type: text/html;charset=ISO-8859-1
Date: Mon, 13 Feb 2017 02:31:12 GMT
Connection: close
Content-Length: 5

This problem is reproducible by using GlassFish 4.1 and 4.1.1. This problem is NOT reproducible by using GlassFish 3.1.2.2.

Affected Versions

[2.3.15]

arinban commented 6 years ago
arinban commented 7 years ago

@glassfishrobot Commented Reported by yama0428

arinban commented 7 years ago

@glassfishrobot Commented @rlubke said: The current behavior, for that header parameter is correct.

From RFC 6266 section 4.3:

The parameters "filename" and "filename" differ only in that "filename" uses the encoding defined in [RFC5987], allowing the use of characters not present in the ISO-8859-1 character set ([ISO-8859-1]).

Also see RFC 5987 for further details on the 'parameter*' definitions.

I would recommend logging a separate enhancement request for handling * parameters.

arinban commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GRIZZLY-1889

arinban commented 7 years ago

@glassfishrobot Commented Marked as works as designed on Monday, February 13th 2017, 11:46:03 am