title: GAE: Setting multiple cookies (or a multi-value cookie) with SimpleCookie
body: <p>I'm using Google App Engine. How do I set either multiple cookies or a multi-value cookie with a single response?</p>
  
  <p>Right now I'm using this code from the URL <a href="http://localhost:8085/server/showcookie?emailAddress=myemail@gmail.com&amp;secretCode=1" rel="nofollow">http://localhost:8085/server/showcookie?emailAddress=myemail@gmail.com&amp;secretCode=1</a></p>
  
  <pre><code>C = Cookie.SimpleCookie()
  C["emailAddress"] = self.request.get('emailAddress')
  C["secretCode"] = self.request.get('secretCode')
  C["secretCode"]["path"] = "/"
  header_value = C.output(header='')
  self.response.headers.add_header("Set-Cookie", header_value)
  </code></pre>
  
  <p>which doesn't work because the value of header_value is emailAddress="myemail@gmail.com" secretCode=1; Path=/ which is not a well formed header (its missing a comma). How can I create a well formed cookie with both values?</p>