title: HtmlUnit CookieManager not sending cookies with the first request
body: <p>I am trying to simulate a scenario using HtmlUnit 2.15 where cookies would have been saved in a previous session and should be send to the server when a page is requested in a new session.
  Here is the code for that...</p>
  
  <pre><code>    String url = "http://localhost:55545/";
      String domain = "localhost:55545";
  
      java.util.logging.Logger.getLogger("com.gargoylesoftware.htmlunit").setLevel(Level.OFF);
  
      WebClient webClient = new WebClient(BrowserVersion.FIREFOX_24);
      CookieManager cookieManager = webClient.getCookieManager();
      cookieManager.setCookiesEnabled(true);
  
      Calendar cal = Calendar.getInstance();
      cal.add(Calendar.HOUR, 1);
      Cookie cookie = new Cookie(domain, "cName", "cValue", "/", cal.getTime(), false);
  
      cookieManager.addCookie(cookie);
      webClient.setCookieManager(cookieManager);
  
      HtmlPage page = null;
      try {
          page = webClient.getPage(url);
      } catch (FailingHttpStatusCodeException e) {
          System.err.print(e.toString());
          return;
      } catch (MalformedURLException e) {
          System.err.print(e.toString());
          return;
      } catch (IOException e) {
          System.err.print(e.toString());
          return;
      }
  </code></pre>
  
  <p>The expected behavior is I should be receiving the cookie "cName" at the server however no cookies are received there. Also verifying the request through a proxy (fiddler) I see that no Cookie header is being sent by the webclient at the first request.</p>
  
  <p>Has anyone been through this? hoping for some advice before I get into debugging HtmlUnit library.</p>