-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Armeria client should set HOST header on upgrade request #5
Comments
trustin
referenced
this issue
in trustin/armeria
Nov 24, 2015
Changes related with Netty 4.1.0.Beta8 upgrade: - Add common.http.Http1ClientCodec to: - work around the bug in Netty HttpClientCodec netty/netty#4504 for more info - add onCloseRequest() as an extension point - Add common.http.AbstractHttpToHttp2ConnectionHandler to - remove the code duplication in HttpConfigurator and ServerInitializer - Avoid using the builder pattern for building Http2ConnectionHandler, because it doesn't really simplify construction a lot - Reorganize the client-side pipeline construction - HttpConfigurator.finishConfiguration() now adds most of the common handlers - Remove HttpSessionChannelFactory.SESSION_ACTIVE and SessionListener - Change the way how the activeness of a session is determined - Active if and only if the pipeline contains HttpSessionHandler - Move the logic related with the determination of the session activeness to HttpSessionHandler Changes related with Jetty HTTP/1&2 interoperability - Fix #4 - Add SessionProtocol to ClientCodec.encodeRequest() as a parameter - so that the session layer can provide more specific session protocol - HttpRemoteInvoker.invoke0() now retrieves the current session protocol from HttpSessionHandler. - Add ThriftOverHttpClientTServletIntegrationTest - Originally written by @anuraaga - Add WorkaroundHandler that works around the issues related with h1c-to-h2c upgrade - Add jetty-serlvet and http2-server to the test dependencies Miscellaneous: - Fix #5 - Fix typo: padding -> pending - Send 'HEAD / HTTP/1.1' instead of 'GET / HTTP/1.1' as recommended by the HTTP/2 official FAQ - Refuse the upgrade stream so that the client can retry the request sent before the upgrade request in H2C - Translate ClosedChannelException to ClosedSessionException in ClientBuilder - Replace HttpSessionHandler.CLOSED_SESSION_EXCEPTION with ClosedSessionException.INSTANCE
trustin
referenced
this issue
in trustin/armeria
Nov 24, 2015
Changes related with Netty 4.1.0.Beta8 upgrade: - Add common.http.Http1ClientCodec to: - work around the bug in Netty HttpClientCodec netty/netty#4504 for more info - add onCloseRequest() as an extension point - Add common.http.AbstractHttpToHttp2ConnectionHandler to - remove the code duplication in HttpConfigurator and ServerInitializer - Avoid using the builder pattern for building Http2ConnectionHandler, because it doesn't really simplify construction a lot - Reorganize the client-side pipeline construction - HttpConfigurator.finishConfiguration() now adds most of the common handlers - Remove HttpSessionChannelFactory.SESSION_ACTIVE and SessionListener - Change the way how the activeness of a session is determined - Active if and only if the pipeline contains HttpSessionHandler - Move the logic related with the determination of the session activeness to HttpSessionHandler Changes related with Jetty HTTP/1&2 interoperability - Fix #4 - Add SessionProtocol to ClientCodec.encodeRequest() as a parameter - so that the session layer can provide more specific session protocol - HttpRemoteInvoker.invoke0() now retrieves the current session protocol from HttpSessionHandler. - Add ThriftOverHttpClientTServletIntegrationTest - Originally written by @anuraaga - Add WorkaroundHandler that works around the issues related with h1c-to-h2c upgrade - Add jetty-serlvet and http2-server to the test dependencies Miscellaneous: - Fix #5 - Fix typo: padding -> pending - Send 'HEAD / HTTP/1.1' instead of 'GET / HTTP/1.1' as recommended by the HTTP/2 official FAQ - Refuse the upgrade stream so that the client can retry the request sent before the upgrade request in H2C - Translate ClosedChannelException to ClosedSessionException in ClientBuilder - Replace HttpSessionHandler.CLOSED_SESSION_EXCEPTION with ClosedSessionException.INSTANCE
trustin
referenced
this issue
in trustin/armeria
Nov 24, 2015
Changes related with Netty 4.1.0.Beta8 upgrade: - Add common.http.Http1ClientCodec to: - work around the bug in Netty HttpClientCodec netty/netty#4504 for more info - add onCloseRequest() as an extension point - Add common.http.AbstractHttpToHttp2ConnectionHandler to - remove the code duplication in HttpConfigurator and ServerInitializer - Avoid using the builder pattern for building Http2ConnectionHandler, because it doesn't really simplify construction a lot - Reorganize the client-side pipeline construction - HttpConfigurator.finishConfiguration() now adds most of the common handlers - Remove HttpSessionChannelFactory.SESSION_ACTIVE and SessionListener - Change the way how the activeness of a session is determined - Active if and only if the pipeline contains HttpSessionHandler - Move the logic related with the determination of the session activeness to HttpSessionHandler Changes related with Jetty HTTP/1&2 interoperability - Fix #4 - Add SessionProtocol to ClientCodec.encodeRequest() as a parameter - so that the session layer can provide more specific session protocol - HttpRemoteInvoker.invoke0() now retrieves the current session protocol from HttpSessionHandler. - Add ThriftOverHttpClientTServletIntegrationTest - Originally written by @anuraaga - Add WorkaroundHandler that works around the issues related with h1c-to-h2c upgrade - Add jetty-serlvet and http2-server to the test dependencies Miscellaneous: - Fix #5 - Fix typo: padding -> pending - Send 'HEAD / HTTP/1.1' instead of 'GET / HTTP/1.1' as recommended by the HTTP/2 official FAQ - Refuse the upgrade stream so that the client can retry the request sent before the upgrade request in H2C - Translate ClosedChannelException to ClosedSessionException in ClientBuilder - Replace HttpSessionHandler.CLOSED_SESSION_EXCEPTION with ClosedSessionException.INSTANCE
trustin
referenced
this issue
in trustin/armeria
Nov 24, 2015
Changes related with Netty 4.1.0.Beta8 upgrade: - Add common.http.Http1ClientCodec to: - work around the bug in Netty HttpClientCodec netty/netty#4504 for more info - add onCloseRequest() as an extension point - Add common.http.AbstractHttpToHttp2ConnectionHandler to - remove the code duplication in HttpConfigurator and ServerInitializer - Avoid using the builder pattern for building Http2ConnectionHandler, because it doesn't really simplify construction a lot - Reorganize the client-side pipeline construction - HttpConfigurator.finishConfiguration() now adds most of the common handlers - Remove HttpSessionChannelFactory.SESSION_ACTIVE and SessionListener - Change the way how the activeness of a session is determined - Active if and only if the pipeline contains HttpSessionHandler - Move the logic related with the determination of the session activeness to HttpSessionHandler Changes related with Jetty HTTP/1&2 interoperability - Fix #4 - Add SessionProtocol to ClientCodec.encodeRequest() as a parameter - so that the session layer can provide more specific session protocol - HttpRemoteInvoker.invoke0() now retrieves the current session protocol from HttpSessionHandler. - Add ThriftOverHttpClientTServletIntegrationTest - Originally written by @anuraaga - Add WorkaroundHandler that works around the issues related with h1c-to-h2c upgrade - Add jetty-serlvet and http2-server to the test dependencies Miscellaneous: - Fix #5 - Fix typo: padding -> pending - Send 'HEAD / HTTP/1.1' instead of 'GET / HTTP/1.1' as recommended by the HTTP/2 official FAQ - Refuse the upgrade stream so that the client can retry the request sent before the upgrade request in H2C - Translate ClosedChannelException to ClosedSessionException in ClientBuilder - Replace HttpSessionHandler.CLOSED_SESSION_EXCEPTION with ClosedSessionException.INSTANCE
trustin
referenced
this issue
in trustin/armeria
Nov 24, 2015
Changes related with Netty 4.1.0.Beta8 upgrade: - Add common.http.Http1ClientCodec to: - work around the bug in Netty HttpClientCodec netty/netty#4504 for more info - add onCloseRequest() as an extension point - Add common.http.AbstractHttpToHttp2ConnectionHandler to - remove the code duplication in HttpConfigurator and ServerInitializer - Avoid using the builder pattern for building Http2ConnectionHandler, because it doesn't really simplify construction a lot - Reorganize the client-side pipeline construction - HttpConfigurator.finishConfiguration() now adds most of the common handlers - Remove HttpSessionChannelFactory.SESSION_ACTIVE and SessionListener - Change the way how the activeness of a session is determined - Active if and only if the pipeline contains HttpSessionHandler - Move the logic related with the determination of the session activeness to HttpSessionHandler Changes related with Jetty HTTP/1&2 interoperability - Fix #4 - Add SessionProtocol to ClientCodec.encodeRequest() as a parameter - so that the session layer can provide more specific session protocol - HttpRemoteInvoker.invoke0() now retrieves the current session protocol from HttpSessionHandler. - Add ThriftOverHttpClientTServletIntegrationTest - Originally written by @anuraaga - Add WorkaroundHandler that works around the issues related with h1c-to-h2c upgrade - Add jetty-serlvet and http2-server to the test dependencies Changes related with cURL interoperability - HttpServerHandler now handles the upgrade request after the upgrade is done successfully. Miscellaneous: - Fix #5 - Fix typo: padding -> pending - Send 'HEAD / HTTP/1.1' instead of 'GET / HTTP/1.1' as recommended by the HTTP/2 official FAQ - Translate ClosedChannelException to ClosedSessionException in ClientBuilder - Replace HttpSessionHandler.CLOSED_SESSION_EXCEPTION with ClosedSessionException.INSTANCE
trustin
referenced
this issue
in trustin/armeria
Nov 24, 2015
Changes related with Netty 4.1.0.Beta8 upgrade: - Add common.http.Http1ClientCodec to: - work around the bug in Netty HttpClientCodec netty/netty#4504 for more info - add onCloseRequest() as an extension point - Add common.http.AbstractHttpToHttp2ConnectionHandler to - remove the code duplication in HttpConfigurator and ServerInitializer - Avoid using the builder pattern for building Http2ConnectionHandler, because it doesn't really simplify construction a lot - Reorganize the client-side pipeline construction - HttpConfigurator.finishConfiguration() now adds most of the common handlers - Remove HttpSessionChannelFactory.SESSION_ACTIVE and SessionListener - Change the way how the activeness of a session is determined - Active if and only if the pipeline contains HttpSessionHandler - Move the logic related with the determination of the session activeness to HttpSessionHandler Changes related with Jetty HTTP/1&2 interoperability - Fix #4 - Add SessionProtocol to ClientCodec.encodeRequest() as a parameter - so that the session layer can provide more specific session protocol - HttpRemoteInvoker.invoke0() now retrieves the current session protocol from HttpSessionHandler. - Add ThriftOverHttpClientTServletIntegrationTest - Originally written by @anuraaga - Add WorkaroundHandler that works around the issues related with h1c-to-h2c upgrade - Add jetty-serlvet and http2-server to the test dependencies Changes related with cURL interoperability - HttpServerHandler now handles the upgrade request after the upgrade is done successfully. Miscellaneous: - Fix #5 - Fix typo: padding -> pending - Send 'HEAD / HTTP/1.1' instead of 'GET / HTTP/1.1' as recommended by the HTTP/2 official FAQ - Translate ClosedChannelException to ClosedSessionException in ClientBuilder - Replace HttpSessionHandler.CLOSED_SESSION_EXCEPTION with ClosedSessionException.INSTANCE
trustin
referenced
this issue
in trustin/armeria
Nov 26, 2015
Changes related with Netty 4.1.0.Beta8 upgrade: - Add common.http.Http1ClientCodec to: - work around the bug in Netty HttpClientCodec netty/netty#4504 for more info - add onCloseRequest() as an extension point - Add common.http.AbstractHttpToHttp2ConnectionHandler to - remove the code duplication in HttpConfigurator and ServerInitializer - Avoid using the builder pattern for building Http2ConnectionHandler, because it doesn't really simplify construction a lot - Reorganize the client-side pipeline construction - HttpConfigurator.finishConfiguration() now adds most of the common handlers - Remove HttpSessionChannelFactory.SESSION_ACTIVE and SessionListener - Change the way how the activeness of a session is determined - Active if and only if the pipeline contains HttpSessionHandler - Move the logic related with the determination of the session activeness to HttpSessionHandler Changes related with Jetty HTTP/1&2 interoperability - Fix #4 - Add SessionProtocol to ClientCodec.encodeRequest() as a parameter - so that the session layer can provide more specific session protocol - HttpRemoteInvoker.invoke0() now retrieves the current session protocol from HttpSessionHandler. - Add ThriftOverHttpClientTServletIntegrationTest - Originally written by @anuraaga - Add WorkaroundHandler that works around the issues related with h1c-to-h2c upgrade - Add jetty-serlvet and http2-server to the test dependencies Changes related with cURL interoperability - HttpServerHandler now handles the upgrade request after the upgrade is done successfully. - Add Http2ClientIdleTimeoutHandler for client-side h2/h2c connections - Use HttpClientIdleTimeoutHandler for h1/h1c connections - Modify HttpServerIdleTimeoutHandler so that it works for both HTTP versions Miscellaneous: - Fix #5 - Fix typo: padding -> pending - Send 'HEAD / HTTP/1.1' instead of 'GET / HTTP/1.1' as recommended by the HTTP/2 official FAQ - Translate ClosedChannelException to ClosedSessionException in ClientBuilder - Replace HttpSessionHandler.CLOSED_SESSION_EXCEPTION with ClosedSessionException.INSTANCE
trustin
referenced
this issue
in trustin/armeria
Nov 26, 2015
Changes related with Netty 4.1.0.Beta8 upgrade: - Add common.http.Http1ClientCodec to: - work around the bug in Netty HttpClientCodec netty/netty#4504 for more info - add onCloseRequest() as an extension point - Add common.http.AbstractHttpToHttp2ConnectionHandler to - remove the code duplication in HttpConfigurator and ServerInitializer - Avoid using the builder pattern for building Http2ConnectionHandler, because it doesn't really simplify construction a lot - Reorganize the client-side pipeline construction - HttpConfigurator.finishConfiguration() now adds most of the common handlers - Remove HttpSessionChannelFactory.SESSION_ACTIVE and SessionListener - Change the way how the activeness of a session is determined - Active if and only if the pipeline contains HttpSessionHandler - Move the logic related with the determination of the session activeness to HttpSessionHandler Changes related with Jetty HTTP/1&2 interoperability - Fix #4 - Add SessionProtocol to ClientCodec.encodeRequest() as a parameter - so that the session layer can provide more specific session protocol - HttpRemoteInvoker.invoke0() now retrieves the current session protocol from HttpSessionHandler. - Add ThriftOverHttpClientTServletIntegrationTest - Originally written by @anuraaga - Add WorkaroundHandler that works around the issues related with h1c-to-h2c upgrade - Add jetty-serlvet and http2-server to the test dependencies Changes related with cURL interoperability - HttpServerHandler now handles the upgrade request after the upgrade is done successfully. - Add Http2ClientIdleTimeoutHandler for client-side h2/h2c connections - Use HttpClientIdleTimeoutHandler for h1/h1c connections - Modify HttpServerIdleTimeoutHandler so that it works for both HTTP versions Miscellaneous: - Fix #5 - Fix typo: padding -> pending - Send 'HEAD / HTTP/1.1' instead of 'GET / HTTP/1.1' as recommended by the HTTP/2 official FAQ - Translate ClosedChannelException to ClosedSessionException in ClientBuilder - Replace HttpSessionHandler.CLOSED_SESSION_EXCEPTION with ClosedSessionException.INSTANCE
trustin
referenced
this issue
in trustin/armeria
Nov 26, 2015
Changes related with Netty 4.1.0.Beta8 upgrade: - Add common.http.Http1ClientCodec to: - work around the bug in Netty HttpClientCodec netty/netty#4504 for more info - add onCloseRequest() as an extension point - Add common.http.AbstractHttpToHttp2ConnectionHandler to - remove the code duplication in HttpConfigurator and ServerInitializer - Avoid using the builder pattern for building Http2ConnectionHandler, because it doesn't really simplify construction a lot - Reorganize the client-side pipeline construction - HttpConfigurator.finishConfiguration() now adds most of the common handlers - Remove HttpSessionChannelFactory.SESSION_ACTIVE and SessionListener - Change the way how the activeness of a session is determined - Active if and only if the pipeline contains HttpSessionHandler - Move the logic related with the determination of the session activeness to HttpSessionHandler Changes related with Jetty HTTP/1&2 interoperability - Fix #4 - Add SessionProtocol to ClientCodec.encodeRequest() as a parameter - so that the session layer can provide more specific session protocol - HttpRemoteInvoker.invoke0() now retrieves the current session protocol from HttpSessionHandler. - Add ThriftOverHttpClientTServletIntegrationTest - Originally written by @anuraaga - Add WorkaroundHandler that works around the issues related with h1c-to-h2c upgrade - Add jetty-serlvet and http2-server to the test dependencies Changes related with cURL interoperability - HttpServerHandler now handles the upgrade request after the upgrade is done successfully. - Add Http2ClientIdleTimeoutHandler for client-side h2/h2c connections - Use HttpClientIdleTimeoutHandler for h1/h1c connections - Modify HttpServerIdleTimeoutHandler so that it works for both HTTP versions Miscellaneous: - Fix #5 - Fix typo: padding -> pending - Send 'HEAD / HTTP/1.1' instead of 'GET / HTTP/1.1' as recommended by the HTTP/2 official FAQ - Translate ClosedChannelException to ClosedSessionException in ClientBuilder - Replace HttpSessionHandler.CLOSED_SESSION_EXCEPTION with ClosedSessionException.INSTANCE
trustin
referenced
this issue
in trustin/armeria
Nov 27, 2015
Changes related with Netty 4.1.0.Beta8 upgrade: - Add common.http.Http1ClientCodec to: - work around the bug in Netty HttpClientCodec netty/netty#4504 for more info - add onCloseRequest() as an extension point - Add common.http.AbstractHttpToHttp2ConnectionHandler to - remove the code duplication in HttpConfigurator and ServerInitializer - Avoid using the builder pattern for building Http2ConnectionHandler, because it doesn't really simplify construction a lot - Reorganize the client-side pipeline construction - HttpConfigurator.finishConfiguration() now adds most of the common handlers - Remove HttpSessionChannelFactory.SESSION_ACTIVE and SessionListener - Change the way how the activeness of a session is determined - Active if and only if the pipeline contains HttpSessionHandler - Move the logic related with the determination of the session activeness to HttpSessionHandler Changes related with Jetty HTTP/1&2 interoperability - Fix #4 - Add SessionProtocol to ClientCodec.encodeRequest() as a parameter - so that the session layer can provide more specific session protocol - HttpRemoteInvoker.invoke0() now retrieves the current session protocol from HttpSessionHandler. - Add ThriftOverHttpClientTServletIntegrationTest - Originally written by @anuraaga - Add WorkaroundHandler that works around the issues related with h1c-to-h2c upgrade - Add jetty-serlvet and http2-server to the test dependencies Changes related with cURL interoperability - HttpServerHandler now handles the upgrade request after the upgrade is done successfully. - Add Http2ClientIdleTimeoutHandler for client-side h2/h2c connections - Use HttpClientIdleTimeoutHandler for h1/h1c connections - Modify HttpServerIdleTimeoutHandler so that it works for both HTTP versions Miscellaneous: - Fix #5 - Fix typo: padding -> pending - Send 'HEAD / HTTP/1.1' instead of 'GET / HTTP/1.1' as recommended by the HTTP/2 official FAQ - Translate ClosedChannelException to ClosedSessionException in ClientBuilder - Replace HttpSessionHandler.CLOSED_SESSION_EXCEPTION with ClosedSessionException.INSTANCE
minwoox
added a commit
to minwoox/armeria
that referenced
this issue
Apr 8, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, armeria client does not seem to set HOST header on the upgrade request. When the request is processed by a HTTP1.1 server, like jetty in default settings, the server issues warning logs like
WARN org.eclipse.jetty.http.HttpParser - bad HTTP parsed: 400 No Host for HttpChannelOverHttp@4373aa09{r=0,c=false,a=IDLE,uri=null}
This is reasonable since HTTP1.1 requests, including an upgrade request must have a Host header as in:
https://http2.github.io/http2-spec/#discover-http
The text was updated successfully, but these errors were encountered: