You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the protocol does not involve the client speaking first, the HTTP protocol sniffer will prevent progress, as it waits for enough characters to detect whether the protocol is in fact HTTP.
If there is a timeout on the handler, set when the handler is added to the channel, when the timeout fires it can be assumed that the protocol is not actually HTTP.
Note: This will fail to detect manually typed HTTP requests, unless the timeout is made large enough to allow the request to be typed out before the timeout fires. Making it too large, however, can negatively affect performance of the non-HTTP protocol. It would appear to be reasonable to use a short timeout (e.g. 1 second), because most browsers will send the request as soon as the connection is opened. It can be worked around for the manual case by using e.g. printf, etc.
See handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java for an example.
The text was updated successfully, but these errors were encountered:
If the protocol does not involve the client speaking first, the HTTP protocol sniffer will prevent progress, as it waits for enough characters to detect whether the protocol is in fact HTTP.
If there is a timeout on the handler, set when the handler is added to the channel, when the timeout fires it can be assumed that the protocol is not actually HTTP.
Note: This will fail to detect manually typed HTTP requests, unless the timeout is made large enough to allow the request to be typed out before the timeout fires. Making it too large, however, can negatively affect performance of the non-HTTP protocol. It would appear to be reasonable to use a short timeout (e.g. 1 second), because most browsers will send the request as soon as the connection is opened. It can be worked around for the manual case by using e.g.
printf
, etc.See handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java for an example.
The text was updated successfully, but these errors were encountered: