title: Set-cookie header does not set cookie cross domain. Cookie not saved
body: <p>I'm trying to do a cross-domain request. Looks like all the headers are ok. However the cookie is not set and I don't know why. Can it be because the 401 server status (no access to change server) or because the request is from http to a https server?</p>
  
  <p>these are the headers:</p>
  
  <pre><code>Request URL:https://domain/current-user
  Request Method:GET
  Status Code:401 Unauthorized
  
  **Request Headers**
  Accept:application/json, text/plain, */*
  Accept-Encoding:gzip,deflate,sdch
  Accept-Language:en-US,en;q=0.8
  Cache-Control:no-cache
  Connection:keep-alive
  Host:app.domain.com
  Origin:http://domain.com
  Pragma:no-cache
  Referer:http://domain.com/
  User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36
  
  **Response Headers**
  Access-Control-Allow-Credentials:true
  Access-Control-Allow-Headers:accept, origin, content-type, cookie
  Access-Control-Allow-Methods:GET,POST
  Access-Control-Allow-Origin:http://domain.com
  Access-Control-Max-Age:1728000
  Connection:keep-alive
  Content-Encoding:gzip
  Content-Type:text/html; charset=utf-8
  Date:Sun, 02 Jun 2013 16:52:58 GMT
  P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
  Server:nginx/1.1.19
  Set-Cookie:domain.ssid=s%3A7GcUvlVmeOgVF5sgyIHCjNn8.S%2FFDoCTOU5q4bT4zNQAECCGg%2FQmKkb9bT7Ee2KaLP2o; Path=/; Expires=Mon, 30 Sep 2013 16:52:58 GMT
  Transfer-Encoding:chunked
  Vary:Accept-Encoding
  X-Cache:MISS
  X-Powered-By:Express
  </code></pre>