You are viewing a plain text version of this content. The canonical link for it is here.
Posted to portalapps-dev@portals.apache.org by "Sascha Arndt (JIRA)" <ji...@apache.org> on 2015/12/21 19:58:46 UTC

[jira] [Created] (APA-72) No cookie rewriging

Sascha Arndt created APA-72:
-------------------------------

             Summary: No cookie rewriging
                 Key: APA-72
                 URL: https://issues.apache.org/jira/browse/APA-72
             Project: Portals Apps
          Issue Type: Bug
          Components: apa-webcontent
    Affects Versions: apa-webcontent-2.0
            Reporter: Sascha Arndt
            Assignee: David Sean Taylor


I have a problem using this maven dependency:
<dependency>
  <groupId>org.apache.portals.applications</groupId>
  <artifactId>apa-webcontent2-reverse-proxy</artifactId>
  <version>2.0</version>
</dependency>

Using this version of apa-webcontent2-reverse-proxy none of my cookies got rewrited. After some debugging session I found out, that the CloseableHttpClient and the ProxyContext were using different CookieStore objects.

I "patched" it locally in replacing "InitHttpClientCommand"s executeInternal-method like this:

  /**
   * {@inheritDoc}
   */
  @Override
  protected boolean executeInternal(final ProxyContext context) throws ReverseProxyException, IOException {
    CookieStore cookieStore = new BasicCookieStore();
    CloseableHttpClient httpClient = httpClientBuilder.setDefaultCookieStore(cookieStore).build();
    context.setCookieStore(cookieStore);
    context.setHttpClient(httpClient);
    return false;
  }

Is this a bug, or am I using it wrong?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)