Skip to content

Commit

Permalink
update jetty configuration setting for proper request encoding of pre…
Browse files Browse the repository at this point in the history
…view
  • Loading branch information
jonfang committed Dec 17, 2018
1 parent 66e626f commit 8a56c6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion viewer/org.eclipse.birt.report.viewer/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Import-Package: javax.servlet;version="2.4.0",
org.apache.commons.logging,
org.eclipse.equinox.http.jetty,
org.osgi.service.http;version="1.2.0"
Export-Package: org.eclipse.birt.report.viewer,
Export-Package: org.eclipse.birt.report.filter,
org.eclipse.birt.report.viewer,
org.eclipse.birt.report.viewer.api,
org.eclipse.birt.report.viewer.browsers,
org.eclipse.birt.report.viewer.browsers.custom,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class ViewerFilter implements Filter
{

// default encoding
protected String encoding = "UTF-8"; //$NON-NLS-1$
protected String encoding = "ISO-8859-1"; //$NON-NLS-1$

// filter config
protected FilterConfig filterConfig = null;
Expand Down Expand Up @@ -64,7 +64,9 @@ public void doFilter( ServletRequest request, ServletResponse response,
{
if ( request.getCharacterEncoding( ) == null && encoding != null )
request.setCharacterEncoding( encoding );

// for >= 9.3.x jetty needs this property to change request encoding,
// this might change for future versions
request.setAttribute("org.eclipse.jetty.server.Request.queryEncoding", encoding);
chain.doFilter( request, response );
}

Expand Down

0 comments on commit 8a56c6d

Please sign in to comment.