-
Notifications
You must be signed in to change notification settings - Fork 66
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
Provide first class support for essential request and response properties #330
Conversation
…ties Provide first class support for essential request and response properties in carbon message
if (value == null) { | ||
return defaultValue; | ||
return 200; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we use a constant?
@@ -89,7 +89,7 @@ public DefaultHttpClientConnector(ConnectionManager connectionManager, SenderCon | |||
this.http2ConnectionManager = connectionManager.getHttp2ConnectionManager(); | |||
this.senderConfiguration = senderConfiguration; | |||
initTargetChannelProperties(senderConfiguration); | |||
if (Float.valueOf(senderConfiguration.getHttpVersion()) == Constants.HTTP_2_0) { | |||
if (senderConfiguration.getHttpVersion().equals(Constants.HTTP_2_0)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (senderConfiguration.getHttpVersion().equals(Constants.HTTP_2_0)) { | |
if (Constants.HTTP_2_0.equals(senderConfiguration.getHttpVersion())) { |
@@ -95,11 +95,11 @@ public static void writeRequestHeaders(HttpCarbonMessage httpOutboundRequest, | |||
} | |||
|
|||
private static void setHttpVersionProperty(HttpCarbonMessage httpOutboundRequest, String httpVersion) { | |||
if (Float.valueOf(httpVersion) == Constants.HTTP_2_0) { | |||
if (httpVersion.equals(Constants.HTTP_2_0)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (httpVersion.equals(Constants.HTTP_2_0)) { | |
if (Constants.HTTP_2_0.equals(httpVersion)) { |
@@ -95,7 +95,7 @@ public HttpClientChannelInitializer(SenderConfiguration senderConfiguration, Htt | |||
this.connectionAvailabilityFuture = connectionAvailabilityFuture; | |||
|
|||
String httpVersion = senderConfiguration.getHttpVersion(); | |||
if (Float.valueOf(httpVersion) == Constants.HTTP_2_0) { | |||
if (httpVersion.equals(Constants.HTTP_2_0)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (httpVersion.equals(Constants.HTTP_2_0)) { | |
if (Constants.HTTP_2_0.equals(httpVersion)) { |
Purpose
Provide first class support for essential request and response properties in carbon message
Goals
Fix the issue : ballerina-platform/ballerina-lang#14953