comparison MoinMoin/support/werkzeug/test.py @ 4754:7cb92118a93e

updated werkzeug to 0.5.1
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 10 Jul 2009 01:07:24 +0200
parents bd3f5ccf6fb6
children 8de563c487be
comparison
equal deleted inserted replaced
4753:5db0151a2df3 4754:7cb92118a93e
89 write('\r\n') 89 write('\r\n')
90 write('--%s--\r\n' % boundary) 90 write('--%s--\r\n' % boundary)
91 91
92 length = int(_closure[0].tell()) 92 length = int(_closure[0].tell())
93 _closure[0].seek(0) 93 _closure[0].seek(0)
94 _closure[0].seek(0)
95 return _closure[0], length, boundary 94 return _closure[0], length, boundary
96 95
97 96
98 def encode_multipart(values, boundary=None, charset='utf-8'): 97 def encode_multipart(values, boundary=None, charset='utf-8'):
99 """Like `stream_encode_multipart` but returns a tuple in the form 98 """Like `stream_encode_multipart` but returns a tuple in the form
119 def __init__(self, headers): 118 def __init__(self, headers):
120 self.headers = headers 119 self.headers = headers
121 120
122 def getheaders(self, name): 121 def getheaders(self, name):
123 headers = [] 122 headers = []
123 name = name.lower()
124 for k, v in self.headers: 124 for k, v in self.headers:
125 if k == name: 125 if k.lower() == name:
126 headers.append(v) 126 headers.append(v)
127 return headers 127 return headers
128 128
129 129
130 class _TestCookieResponse(object): 130 class _TestCookieResponse(object):