Fix cookie processing for RDAP URL update (#630)

* Fix cookie processing for RDAP URL update

The existing code only does cookie processing on the _first_ Set-Cookie
header.  Therefore, if the "id" cookie used for authentication is defined in
anything other than the first Set-Cookie header (as it now is), we don't find
it.

Replace the cookie processing stanza with a line that processes all cookies in
all Set-Cookie headers.
This commit is contained in:
Michael Muller 2020-06-16 15:07:13 -04:00 committed by GitHub
parent dcaef1c6fc
commit 8cca863df9
2 changed files with 6 additions and 1 deletions

View file

@ -319,6 +319,10 @@ public final class UpdateRegistrarRdapBaseUrlsActionTest extends ShardableTestCa
private static void addValidResponses(TestHttpTransport httpTransport) {
MockLowLevelHttpResponse loginResponse = new MockLowLevelHttpResponse();
loginResponse.addHeader(
"Set-Cookie",
"JSESSIONID=bogusid; "
+ "Expires=Tue, 11-Jun-2019 16:34:21 GMT; Path=/; Secure; HttpOnly");
loginResponse.addHeader(
"Set-Cookie",
"id=myAuthenticationId; "