Skip to content

Commit

Permalink
Fix for #981
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarcand committed Mar 25, 2013
1 parent dc2f737 commit bc9a54d
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public class ServletProxyFactory {
private final static MethodHandler voidMethodHandler = new EchoMethodHandler();

private ServletProxyFactory() {
addMethodHandler("encodeURL", voidMethodHandler).addMethodHandler("encodeRedirectURL", voidMethodHandler);
addMethodHandler("encodeURL", voidMethodHandler)
.addMethodHandler("encodeRedirectURL", voidMethodHandler)
.addMethodHandler("getCharacterEncoding", new UTF8Handler());
}

public final Object proxy(Object clazz, Method method, Object[] methodObjects) {
Expand Down Expand Up @@ -79,6 +81,13 @@ public Object handle(Object clazz, Method method, Object[] methodObjects) {
return methodObjects[0];
}
}

public static class UTF8Handler implements MethodHandler{
@Override
public Object handle(Object clazz, Method method, Object[] methodObjects) {
return "UTF-8";
}
}
}


0 comments on commit bc9a54d

Please sign in to comment.