title: Python GAE Requests not returning cookies after get request
body: <p>I have written a project in python which I am now in the process of moving to google app engine. The problem that occurs is when I run this code on GAE:</p>
  
  <pre><code>import requests
  from google.appengine.api import urlfetch
  
  def retrievePage(url, id):
      response = 'http://online2.citybreak.com/Book/Package/Result.aspx?onlineid=%s' % id
      # Set the timeout to 60 seconds
      urlfetch.set_default_fetch_deadline(60)
  
      # Send the first request
      r1 = requests.get(url)
  
      cookies = r1.cookies
  
      print 'Cookies: %s' % r1.cookies
  
      # Retrieve the content
      r2 = requests.get(response, cookies=cookies)
      return r2.text
  </code></pre>
  
  <p>When running the code on GAE the cookies from the first request are missing. That is to say, <code>r1.cookies</code> is just an empty cookie jar. The same code works just fine on my django server where the cookies should contain a asp.net session id.</p>
  
  <p>The reason i have two requests is because the first one redirects the user and will only retrieve the correct page if the session cookie is the same. </p>
  
  <p>print output on GAE:</p>
  
  <pre><code>Cookies: &lt;&lt;class 'requests.cookies.RequestsCookieJar'&gt;[]&gt;
  </code></pre>
  
  <p>print output on Django:</p>
  
  <pre><code>Cookies: &lt;&lt;class 'requests.cookies.RequestsCookieJar'&gt;[&lt;Cookie ASP.NET_SessionId=dhmk1vt3ujgmhhhmbwsclukb for online2.citybreak.com/&gt;]&gt;
  </code></pre>
  
  <p>Anyone know what the problem might be? Is GAE stripping away the cookie information? I am also opened to any suggestions on another way to retrieve the page, i just found that the requests module was easier than the alternatives i found.</p>