[ https://issues.apache.org/jira/browse/TINKERPOP-2830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17783850#comment-17783850 ]
ASF GitHub Bot commented on TINKERPOP-2830: ------------------------------------------- ryn5 commented on code in PR #2328: URL: https://github.com/apache/tinkerpop/pull/2328#discussion_r1385846938 ########## gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/channel/UnifiedTestChannelizer.java: ########## @@ -24,7 +24,9 @@ /** * A wrapper around UnifiedChannelizer which saves and exposes the ChannelHandlerContext for testing purposes */ -public class UnifiedTestChannelizer extends UnifiedChannelizer implements TestChannelizer { +public class Review Comment: Fixed ########## gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/channel/WsAndHttpTestChannelizer.java: ########## @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tinkerpop.gremlin.server.channel; + +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelPipeline; + +/** + * A wrapper around UnifiedChannelizer which saves and exposes the ChannelHandlerContext for testing purposes + */ +public class WsAndHttpTestChannelizer extends WsAndHttpChannelizer implements TestChannelizer { + + final ContextHandler contextHandler; + + public WsAndHttpTestChannelizer() { + contextHandler = new ContextHandler(); + } + + @Override + public void configure(final ChannelPipeline pipeline) { + super.configure(pipeline); + pipeline.addLast(contextHandler); + } + + public ChannelHandlerContext getMostRecentChannelHandlerContext() { + return contextHandler.getMostRecentChannelHandlerContext(); + } + + public void resetChannelHandlerContext() { + contextHandler.resetChannelHandlerContext(); + } +} Review Comment: Fixed > Handle User-Agent from HTTP Requests to server > ---------------------------------------------- > > Key: TINKERPOP-2830 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2830 > Project: TinkerPop > Issue Type: Improvement > Components: server > Affects Versions: 3.5.4 > Reporter: Cole Greer > Priority: Critical > > Changes are being introduced in > [2480|https://issues.apache.org/jira/browse/TINKERPOP-2480] which add a user > agent which is sent as a request header during web socket handshakes. > Originally 2480 was planned to also include the server accepting user agents > from http requests but this has now fallen outside of the scope. This ticket > is to complete the user agent feature by adding the ability for the server to > accept user agents in http requests in addition to web sockets. -- This message was sent by Atlassian Jira (v8.20.10#820010)