You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sebastian Schuberth (Jira)" <ji...@apache.org> on 2024/06/26 09:31:00 UTC

[jira] [Commented] (MRESOLVER-574) Invalid Cookie set under proxy conditions

    [ https://issues.apache.org/jira/browse/MRESOLVER-574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17860103#comment-17860103 ] 

Sebastian Schuberth commented on MRESOLVER-574:
-----------------------------------------------

Quoting [this|https://stackoverflow.com/a/40697322/1127485] answer from StackOverflow as a possible solution:

The default HttpClient has difficulty understanding the latest RFC-compliant headers.

Instead of hiding the warning, just switch to a standard cookie spec like this (HttpClient 4.4+):
{code:java}
HttpClient httpClient = HttpClients.custom()
.setDefaultRequestConfig(RequestConfig.custom()
.setCookieSpec(CookieSpecs.STANDARD).build())
.build();
{code}
 

> Invalid Cookie set under proxy conditions
> -----------------------------------------
>
>                 Key: MRESOLVER-574
>                 URL: https://issues.apache.org/jira/browse/MRESOLVER-574
>             Project: Maven Resolver
>          Issue Type: Bug
>          Components: Resolver
>    Affects Versions: 1.9.20
>         Environment: Mac OS Sonoma with ZScaler proxy
>            Reporter: Helio Chissini de Castro
>            Priority: Minor
>
> We use a compliance OSS tool called [OSS Review Toolkit|http://github.com/oss-review-toolkit/ort] that make usage of resolver library to access artifacts described in a input document.
> Under regular open network, as example github CI/CD workflow, everything works fine.
> But when under proxy environment, most specific main test over Mac zscaler, it causes a warning that not prevent the operation, but can raise some flags. It's described here:
> {code:java}
> 09:35:04.112 [DefaultDispatcher-worker-1] WARN  org.apache.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: <REDACTED>; Expires=Wed, 03 Jul 2024 07:35:03 GMT; Path=/". Invalid 'expires' attribute: Wed, 03 Jul 2024 07:35:03 GMT
> 09:35:04.113 [DefaultDispatcher-worker-1] WARN  org.apache.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: AWSALBCORS=<REDACTED>; Expires=Wed, 03 Jul 2024 07:35:03 GMT; Path=/; SameSite=None; Secure". Invalid 'expires' attribute: Wed, 03 Jul 2024 07:35:03 GMT{code}
> After we cleared that was not direct Ort issue, next possible assumption was resolver library.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)