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

ASF GitHub Bot commented on NUTCH-2280:
---------------------------------------

GitHub user stevegy opened a pull request:

    https://github.com/apache/nutch/pull/134

    fix the cookie policy issue in post form authentication

    Fix the [NUTCH-2280](https://issues.apache.org/jira/browse/NUTCH-2280).
    When a HTTP post receives session cookie from server, it might hit an issue 
when the server has a domain name set as ".domain.com". The "." at beginning 
will cause HttpClient reject this cookie.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/stevegy/nutch NUTCH-2280

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nutch/pull/134.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #134
    
----
commit 993e997e2d5795c0623cdf5614d02c7a8ce405d5
Author: Steve Yao <[email protected]>
Date:   2016-07-12T11:41:10Z

    fix the cookie policy issue when the form authentication receives session 
cookie in a non-standard format - NUTCH-2280

----


> HTTP Post form authentication CookiePolicy configuration
> --------------------------------------------------------
>
>                 Key: NUTCH-2280
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2280
>             Project: Nutch
>          Issue Type: New Feature
>          Components: protocol
>    Affects Versions: 1.11
>            Reporter: Steve Yao
>            Priority: Minor
>              Labels: authentication
>         Attachments: NUTCH-2280.YAO.160705.patch.txt
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> The protocol-httpclient plugin supports HTTP form authentication with form 
> values post back to the assigned login URL and store the session cookie for 
> following content retrieving.
> The httpclient default CookiePolicy setting is in use. This default setting 
> will reject cookie has domain set starting as ".", for example 
> domain=".domain.com". This kind of domain value could be accepted by most web 
> browsers. 
> I suggest to add an configurable option in conf/httpclient-auth.xml:
> {code:xml}<credentials authMethod="formMethod" ...>
> ...
>   <loginCookie>
>     <policy>DEFAULT | BROWSER_COMPATIBILITY | NETSCAPE RFC_2109 | 
> RFC_2965</policy>
>   </loginCookie>
> </credentials>{code}
> Then, the httpclient could take this Cookie policy value.
> I am working on a patch for this feature. But before i implement the 
> configuration format change, i would like to hear any other suggestions or 
> comments. 



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

Reply via email to