Browse Source

unchallenged connections fixed. #180

master
Nikita 11 years ago
parent
commit
6ded360ae1
  1. 2
      src/main/java/com/corundumstudio/socketio/handler/AuthorizeHandler.java

2
src/main/java/com/corundumstudio/socketio/handler/AuthorizeHandler.java

@ -95,7 +95,7 @@ public class AuthorizeHandler extends ChannelInboundHandlerAdapter implements Di
if (!configuration.isAllowCustomRequests()
&& !queryDecoder.path().startsWith(connectPath)) {
HttpResponse res = new DefaultHttpResponse(HTTP_1_1, HttpResponseStatus.BAD_REQUEST);
channel.write(res).addListener(ChannelFutureListener.CLOSE);
channel.writeAndFlush(res).addListener(ChannelFutureListener.CLOSE);
req.release();
log.warn("Blocked wrong request! url: {}, ip: {}", queryDecoder.path(), channel.remoteAddress());
return;

Loading…
Cancel
Save