Commits

Anonymous committed 378d0a8

Adding code for 2454494

Comments (0)

Files changed (2)

2454494/multiheaders.py

+    import httplib
+    from StringIO import StringIO
+
+    msg = \
+    """Set-Cookie: Foo
+    Set-Cookie: Bar
+    Set-Cookie: Baz
+
+    This is the message"""
+
+    msg = StringIO(msg)
+
+    msg = httplib.HTTPMessage(msg)
+
+    assert msg['Set-Cookie'] == 'Foo, Bar, Baz'

2454494/server.py

+import cherrypy
+
+class HelloWorld(object):
+	def index(self):
+		cherrypy.response.header_list = [('Foo', 'foo'),('Foo', 'bar')]
+		cherrypy.response.headers['Baz'] = 'baz'
+		cherrypy.response.headers['Baz'] = 'boo'
+		return "Hello World!"
+	index.exposed = True
+
+cherrypy.quickstart(HelloWorld())