|
|
fa5571 |
diff -up ./server/src/main/java/org/apache/xmlrpc/webserver/HttpServletRequestImpl.java.fix ./server/src/main/java/org/apache/xmlrpc/webserver/HttpServletRequestImpl.java
|
|
|
fa5571 |
--- ./server/src/main/java/org/apache/xmlrpc/webserver/HttpServletRequestImpl.java.fix 2012-07-24 14:49:54.000000000 -0400
|
|
|
fa5571 |
+++ ./server/src/main/java/org/apache/xmlrpc/webserver/HttpServletRequestImpl.java 2012-07-24 18:20:17.000000000 -0400
|
|
|
fa5571 |
@@ -31,6 +31,7 @@ import java.net.URLDecoder;
|
|
|
fa5571 |
import java.security.Principal;
|
|
|
fa5571 |
import java.util.ArrayList;
|
|
|
fa5571 |
import java.util.Collections;
|
|
|
fa5571 |
+import java.util.Collection;
|
|
|
fa5571 |
import java.util.Enumeration;
|
|
|
fa5571 |
import java.util.HashMap;
|
|
|
fa5571 |
import java.util.Iterator;
|
|
|
fa5571 |
@@ -41,8 +42,15 @@ import java.util.StringTokenizer;
|
|
|
fa5571 |
|
|
|
fa5571 |
import javax.servlet.RequestDispatcher;
|
|
|
fa5571 |
import javax.servlet.ServletInputStream;
|
|
|
fa5571 |
+import javax.servlet.DispatcherType;
|
|
|
fa5571 |
+import javax.servlet.AsyncContext;
|
|
|
fa5571 |
+import javax.servlet.ServletContext;
|
|
|
fa5571 |
+import javax.servlet.ServletRequest;
|
|
|
fa5571 |
+import javax.servlet.ServletResponse;
|
|
|
fa5571 |
import javax.servlet.http.Cookie;
|
|
|
fa5571 |
+import javax.servlet.http.Part;
|
|
|
fa5571 |
import javax.servlet.http.HttpServletRequest;
|
|
|
fa5571 |
+import javax.servlet.http.HttpServletResponse;
|
|
|
fa5571 |
import javax.servlet.http.HttpSession;
|
|
|
fa5571 |
|
|
|
fa5571 |
import org.apache.xmlrpc.common.XmlRpcStreamConfig;
|
|
|
fa5571 |
@@ -66,6 +74,7 @@ public class HttpServletRequestImpl impl
|
|
|
fa5571 |
private String queryString;
|
|
|
fa5571 |
private String httpVersion;
|
|
|
fa5571 |
private final Map headers = new HashMap();
|
|
|
fa5571 |
+ private final Map parts = new HashMap();
|
|
|
fa5571 |
private final Map attributes = new HashMap();
|
|
|
fa5571 |
private Map parameters;
|
|
|
fa5571 |
private String characterEncoding;
|
|
|
fa5571 |
@@ -227,6 +236,12 @@ public class HttpServletRequestImpl impl
|
|
|
fa5571 |
return Collections.enumeration(list);
|
|
|
fa5571 |
}
|
|
|
fa5571 |
|
|
|
fa5571 |
+ public Part getPart(String name) { throw new IllegalStateException("Not implemented"); }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
+ public Collection getParts() { throw new IllegalStateException("Not implemented"); }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
+ public boolean authenticate (HttpServletResponse response) { throw new IllegalStateException("Not implemented"); }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
public int getIntHeader(String pHeader) {
|
|
|
fa5571 |
String s = getHeader(pHeader);
|
|
|
fa5571 |
return s == null ? -1 : Integer.parseInt(s);
|
|
|
fa5571 |
@@ -242,6 +257,10 @@ public class HttpServletRequestImpl impl
|
|
|
fa5571 |
|
|
|
fa5571 |
public String getRemoteUser() { throw new IllegalStateException("Not implemented"); }
|
|
|
fa5571 |
|
|
|
fa5571 |
+ public void login(String username, String password) { throw new IllegalStateException("Not implemented"); }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
+ public void logout() { throw new IllegalStateException("Not implemented"); }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
public String getRequestURI() { return uri; }
|
|
|
fa5571 |
|
|
|
fa5571 |
public StringBuffer getRequestURL() {
|
|
|
fa5571 |
@@ -280,6 +299,20 @@ public class HttpServletRequestImpl impl
|
|
|
fa5571 |
return sb;
|
|
|
fa5571 |
}
|
|
|
fa5571 |
|
|
|
fa5571 |
+ public AsyncContext getAsyncContext() { throw new IllegalStateException("Not implemented"); }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
+ public boolean isAsyncSupported() { return false; }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
+ public boolean isAsyncStarted() { return false; }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
+ public ServletContext getServletContext() { throw new IllegalStateException("Not implemented"); }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
+ public AsyncContext startAsync(ServletRequest req, ServletResponse resp) { throw new IllegalStateException("Not implemented"); }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
+ public AsyncContext startAsync() { throw new IllegalStateException("Not implemented"); }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
+ public DispatcherType getDispatcherType() { throw new IllegalStateException("Not implemented"); }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
public String getRequestedSessionId() { throw new IllegalStateException("Not implemented"); }
|
|
|
fa5571 |
|
|
|
fa5571 |
public String getServletPath() { return uri; }
|
|
|
fa5571 |
diff -up ./server/src/main/java/org/apache/xmlrpc/webserver/HttpServletResponseImpl.java.fix ./server/src/main/java/org/apache/xmlrpc/webserver/HttpServletResponseImpl.java
|
|
|
fa5571 |
--- ./server/src/main/java/org/apache/xmlrpc/webserver/HttpServletResponseImpl.java.fix 2012-07-24 14:49:46.000000000 -0400
|
|
|
fa5571 |
+++ ./server/src/main/java/org/apache/xmlrpc/webserver/HttpServletResponseImpl.java 2012-07-24 15:22:31.000000000 -0400
|
|
|
fa5571 |
@@ -29,6 +29,8 @@ import java.util.Iterator;
|
|
|
fa5571 |
import java.util.List;
|
|
|
fa5571 |
import java.util.Locale;
|
|
|
fa5571 |
import java.util.Map;
|
|
|
fa5571 |
+import java.util.Collection;
|
|
|
fa5571 |
+import java.util.Collections;
|
|
|
fa5571 |
import java.util.StringTokenizer;
|
|
|
fa5571 |
|
|
|
fa5571 |
import javax.servlet.ServletOutputStream;
|
|
|
fa5571 |
@@ -84,7 +86,7 @@ public class HttpServletResponseImpl imp
|
|
|
fa5571 |
}
|
|
|
fa5571 |
}
|
|
|
fa5571 |
|
|
|
fa5571 |
- private String getHeader(String pHeader) {
|
|
|
fa5571 |
+ public String getHeader(String pHeader) {
|
|
|
fa5571 |
String key = pHeader.toLowerCase();
|
|
|
fa5571 |
Object o = headers.get(key);
|
|
|
fa5571 |
if (o == null) {
|
|
|
fa5571 |
@@ -101,6 +103,26 @@ public class HttpServletResponseImpl imp
|
|
|
fa5571 |
}
|
|
|
fa5571 |
}
|
|
|
fa5571 |
|
|
|
fa5571 |
+ public Collection getHeaderNames() {
|
|
|
fa5571 |
+ return headers.keySet();
|
|
|
fa5571 |
+ }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
+ public Collection getHeaders(String pHeader) {
|
|
|
fa5571 |
+ String key = pHeader.toLowerCase();
|
|
|
fa5571 |
+ Object o = headers.get(key);
|
|
|
fa5571 |
+ List list;
|
|
|
fa5571 |
+ if (o instanceof List) {
|
|
|
fa5571 |
+ list = (List) o;
|
|
|
fa5571 |
+ } else {
|
|
|
fa5571 |
+ list = Collections.singletonList(o);
|
|
|
fa5571 |
+ }
|
|
|
fa5571 |
+ return list;
|
|
|
fa5571 |
+ }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
+ public int getStatus() {
|
|
|
fa5571 |
+ return status;
|
|
|
fa5571 |
+ }
|
|
|
fa5571 |
+
|
|
|
fa5571 |
public void addIntHeader(String pHeader, int pValue) {
|
|
|
fa5571 |
addHeader(pHeader, Integer.toString(pValue));
|
|
|
fa5571 |
}
|