-
Notifications
You must be signed in to change notification settings - Fork 23
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
Added method to ensure that reponse headers are correclty cased befor… #53
Added method to ensure that reponse headers are correclty cased befor… #53
Conversation
…e verification. (#43)
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.
No wild imports.
import org.apache.http.Header; | ||
import org.apache.http.HttpEntityEnclosingRequest; | ||
import org.apache.http.HttpResponse; | ||
import org.apache.http.client.methods.*; |
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.
Wild
/** | ||
* Substring constants. | ||
*/ | ||
private static final int SUBSTRING_BEGIN_INDEX = 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.
Constants can have better names, have no clue what this is about. If we would add a second substring with different params it would be really confusing.
@@ -486,6 +521,21 @@ public static void validateResponseSignature(int responseCode, byte[] responseBo | |||
return outputStream.toByteArray(); | |||
} | |||
|
|||
private static String ensureHeaderCorrectlyCased(String headerName) { |
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.
ernsure sounds like we're asserting, while this would return a value.
Closes #43