arturobernalg opened a new pull request #316:
URL: https://github.com/apache/httpcomponents-client/pull/316
Note that there is no reason to have a loop given the flow will be
interrupted if the Protocol have "/" or not
`private boolean from1_0Origin(final HttpResponse response) {
final Iterator<HeaderElement> it = MessageSupport.iterate(response,
HeaderConstants.VIA);
if (it.hasNext()) {
final HeaderElement elt = it.next();
final String proto = elt.toString().split("\\s")[0];
if (proto.contains("/")) {
return proto.equals("HTTP/1.0");
} else {
return proto.equals("1.0");
}
}`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]