You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John Casey (JIRA)" <ji...@codehaus.org> on 2009/06/09 18:01:42 UTC

[jira] Created: (WAGON-269) Allow configuration of httpclient to change cookie policy, other options

Allow configuration of httpclient to change cookie policy, other options
------------------------------------------------------------------------

                 Key: WAGON-269
                 URL: http://jira.codehaus.org/browse/WAGON-269
             Project: Maven Wagon
          Issue Type: Improvement
          Components: wagon-http
    Affects Versions: 1.0-beta-5
            Reporter: John Casey


In some cases, using non-lightweight http wagon can result in WARNING messages about cookies with an incorrect path. This can be a particular problem where internal rewrite modules change the location of a servlet that expects to be at a different path than the one the browser used to access it.

httpclient configuration options need to be exposed for configuration from the settings.xml in order to allow users to fix this. Simply ignoring cookies is probably not a great option, since some sites do rely on session cookies to maintain authentication, etc. Additionally, there is a wealth of configuration available for httpclient, and exposing a method for configuring this wagon comprehensively should help us head off future concerns about one of the other config options.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (WAGON-269) Allow configuration of httpclient to change cookie policy, other options

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey closed WAGON-269.
----------------------------

      Assignee: John Casey
    Resolution: Fixed

Fine-grained control now looks like the following:

{code:xml}
<server>
  <id>myrepo</id>
  <configuration>
    <httpConfiguration>
      <all>
        <params>
          <http.protocol.cookie-policy>ignoreCookies</http.protocol.cookie-policy>
        </params>
        <useDefaultHeaders>false</useDefaultHeaders>
        <headers>
          <!-- turn off Accept-Encoding from default headers, then re-add the rest of the default headers -->
          <Cache-control>no-cache</Cache-control>
          <Cache-store>no-store</Cache-store>
          <Pragma>no-cache</Pragma>
          <Expires>0</Expires>
        </headers>
      </all>
    </httpConfiguration>
  </configuration>
</server>
{code}

Note that you have four configuration sections: all, get, put, and head. These correspond to the HTTP methods used by the http wagon, plus 'all', which supplies configuration for all methods in use.

> Allow configuration of httpclient to change cookie policy, other options
> ------------------------------------------------------------------------
>
>                 Key: WAGON-269
>                 URL: http://jira.codehaus.org/browse/WAGON-269
>             Project: Maven Wagon
>          Issue Type: Improvement
>          Components: wagon-http
>    Affects Versions: 1.0-beta-5
>            Reporter: John Casey
>            Assignee: John Casey
>             Fix For: 1.0
>
>
> In some cases, using non-lightweight http wagon can result in WARNING messages about cookies with an incorrect path. This can be a particular problem where internal rewrite modules change the location of a servlet that expects to be at a different path than the one the browser used to access it.
> httpclient configuration options need to be exposed for configuration from the settings.xml in order to allow users to fix this. Simply ignoring cookies is probably not a great option, since some sites do rely on session cookies to maintain authentication, etc. Additionally, there is a wealth of configuration available for httpclient, and exposing a method for configuring this wagon comprehensively should help us head off future concerns about one of the other config options.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WAGON-269) Allow configuration of httpclient to change cookie policy, other options

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated WAGON-269:
-------------------------------

    Fix Version/s:     (was: 1.0)
                   1.0-beta-6

> Allow configuration of httpclient to change cookie policy, other options
> ------------------------------------------------------------------------
>
>                 Key: WAGON-269
>                 URL: http://jira.codehaus.org/browse/WAGON-269
>             Project: Maven Wagon
>          Issue Type: Improvement
>          Components: wagon-http
>    Affects Versions: 1.0-beta-5
>            Reporter: John Casey
>            Assignee: John Casey
>             Fix For: 1.0-beta-6
>
>
> In some cases, using non-lightweight http wagon can result in WARNING messages about cookies with an incorrect path. This can be a particular problem where internal rewrite modules change the location of a servlet that expects to be at a different path than the one the browser used to access it.
> httpclient configuration options need to be exposed for configuration from the settings.xml in order to allow users to fix this. Simply ignoring cookies is probably not a great option, since some sites do rely on session cookies to maintain authentication, etc. Additionally, there is a wealth of configuration available for httpclient, and exposing a method for configuring this wagon comprehensively should help us head off future concerns about one of the other config options.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WAGON-269) Allow configuration of httpclient to change cookie policy, other options

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey updated WAGON-269:
-----------------------------

    Fix Version/s: 1.0

> Allow configuration of httpclient to change cookie policy, other options
> ------------------------------------------------------------------------
>
>                 Key: WAGON-269
>                 URL: http://jira.codehaus.org/browse/WAGON-269
>             Project: Maven Wagon
>          Issue Type: Improvement
>          Components: wagon-http
>    Affects Versions: 1.0-beta-5
>            Reporter: John Casey
>             Fix For: 1.0
>
>
> In some cases, using non-lightweight http wagon can result in WARNING messages about cookies with an incorrect path. This can be a particular problem where internal rewrite modules change the location of a servlet that expects to be at a different path than the one the browser used to access it.
> httpclient configuration options need to be exposed for configuration from the settings.xml in order to allow users to fix this. Simply ignoring cookies is probably not a great option, since some sites do rely on session cookies to maintain authentication, etc. Additionally, there is a wealth of configuration available for httpclient, and exposing a method for configuring this wagon comprehensively should help us head off future concerns about one of the other config options.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGON-269) Allow configuration of httpclient to change cookie policy, other options

Posted by "Hiram Chirino (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGON-269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=210988#action_210988 ] 

Hiram Chirino commented on WAGON-269:
-------------------------------------

I have this in my pom..
{code}
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>1.0-beta-6</version>
      </extension>
    </extensions>
{code}

And this in my setings xml file...
{code}
    <server>
      <id>snapshot.fusesource.org</id>
      <configuration>
        <httpConfiguration>
          <all>
            <params>
              <http.protocol.cookie-policy>compatibility</http.protocol.cookie-policy>
            </params>
          </all>
        </httpConfiguration>
      </configuration>
    </server>
{code}

But I still see warnings like this when I deploy:

{code}
Feb 21, 2010 6:32:36 PM org.apache.commons.httpclient.HttpMethodBase processCookieHeaders
WARNING: Cookie rejected: "$Version=0; openiona=71.180.152.243.1266795156396940; $Path=/; $Domain=.fusesource.com". Illegal domain attribute ".fusesource.com". Domain of origin: "fusesource.com"
Feb 21, 2010 6:32:36 PM org.apache.commons.httpclient.HttpMethodBase processCookieHeaders
WARNING: Cookie rejected: "$Version=0; openiona=71.180.152.243.1266795156472945; $Path=/; $Domain=.fusesource.com". Illegal domain attribute ".fusesource.com". Domain of origin: "fusesource.com"
{code}

I don't think the http.protocol.cookie-policy is actually doing anything.  This is kinda related to WAGON-273

> Allow configuration of httpclient to change cookie policy, other options
> ------------------------------------------------------------------------
>
>                 Key: WAGON-269
>                 URL: http://jira.codehaus.org/browse/WAGON-269
>             Project: Maven Wagon
>          Issue Type: Improvement
>          Components: wagon-http
>    Affects Versions: 1.0-beta-5
>            Reporter: John Casey
>            Assignee: John Casey
>             Fix For: 1.0-beta-6
>
>
> In some cases, using non-lightweight http wagon can result in WARNING messages about cookies with an incorrect path. This can be a particular problem where internal rewrite modules change the location of a servlet that expects to be at a different path than the one the browser used to access it.
> httpclient configuration options need to be exposed for configuration from the settings.xml in order to allow users to fix this. Simply ignoring cookies is probably not a great option, since some sites do rely on session cookies to maintain authentication, etc. Additionally, there is a wealth of configuration available for httpclient, and exposing a method for configuring this wagon comprehensively should help us head off future concerns about one of the other config options.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira