-
Notifications
You must be signed in to change notification settings - Fork 121
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
Headers modified in Socket creation. #179
Conversation
Update: - String formatter with \r\n removed and modified with alternate approach. - Host param is removed.
@@ -83,8 +83,7 @@ public Socket attach(Args args) throws IOException { | |||
*/ | |||
public Socket attach(String indexName, Args args) throws IOException { | |||
Socket socket = service.open(); | |||
OutputStream ostream = socket.getOutputStream(); | |||
Writer out = new OutputStreamWriter(ostream, "UTF-8"); | |||
PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), "UTF-8")); |
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.
Why is the type of writer being changed here? It's not clear from the PR summary.
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.
PR summary updated.
|
||
out.write(header.toString()); | ||
out.flush(); | ||
headers.add(""); |
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.
Curious what this line is doing
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.
This empty string for headers is intentionally kept for terminating header string
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.
Looks good, thanks for the explanations @bparmar-splunk 🚀
Update: