mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix isSupported after last commit
This commit is contained in:
@@ -80,7 +80,7 @@ public class XmlRpcServerImpl implements XmlRpcServer {
|
||||
static final class XmlRpcRequestHandler extends HttpRequestHandler {
|
||||
@Override
|
||||
public boolean isSupported(HttpRequest request) {
|
||||
return request == HttpMethod.POST || request == HttpMethod.OPTIONS;
|
||||
return request.getMethod() == HttpMethod.POST || request.getMethod() == HttpMethod.OPTIONS;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -103,7 +103,7 @@ public class XmlRpcServerImpl implements XmlRpcServer {
|
||||
}
|
||||
|
||||
private boolean process(QueryStringDecoder urlDecoder, HttpRequest request, ChannelHandlerContext context) throws IOException {
|
||||
if (!(urlDecoder.getPath().isEmpty() || urlDecoder.getPath().equals("/") || urlDecoder.getPath().equalsIgnoreCase("/RPC2"))) {
|
||||
if (!isXmlRpcRequest(urlDecoder.getPath())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -138,6 +138,10 @@ public class XmlRpcServerImpl implements XmlRpcServer {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean isXmlRpcRequest(String path) {
|
||||
return path.isEmpty() || (path.length() == 1 && path.charAt(0) == '/') || path.equalsIgnoreCase("/RPC2");
|
||||
}
|
||||
|
||||
private static class XmlRpcHandlerMappingImpl implements XmlRpcHandlerMapping {
|
||||
protected final THashMap<String, Object> handlers = new THashMap<String, Object>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user