Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1576

httpclient incorrectly return Cookie rejected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 4.3.3
    • None
    • HttpClient (classic)
    • OS X 10.10

    Description

      I use httpclient as a web crawler. The request url is http://www1.bloomingdales.com/shop/product/polder-digital-kitchen-timer?ID=478960 and the destination ip is 23.215.63.18. So I create a request as follow:
      URL requestUrl = new URL("http://23.215.63.18/shop/product/polder-digital-kitchen-timer?ID=478960");
      HttpUriRequest request = new HttpGet(requestUrl.toURI());
      request.addHeader("Host", "www1.bloomingdales.com");

      It return that "Cookie rejected Illegal domain attribute "bloomingdales.com". Domain of origin: "23.215.63.18"

      I debug it, and find out RequestAddCookies use 23.215.63.18 as host and check cookie valid with the response cookie info which domain is ".bloomingdales.com", So it failed.

      Here my host is www1.bloomingdales.com, RequestAddCookies should use www1.bloomingdales.com not 23.215.63.18.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jesical Jiandong Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: