Changeset 2552
- Timestamp:
- 05/12/08 10:46:26 (1 year ago)
- Files:
-
- cherokee/trunk/qa/030-Post+urlencoded.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/qa/030-Post+urlencoded.py
r2179 r2552 2 2 from base import * 3 3 4 CONF = """ 4 DIR = "post_zero_len1" 5 MAGIC = '<a href="http://www.alobbs.com/">Alvaro</a>' 6 7 CONF = """ 5 8 vserver!1!rule!300!match = directory 6 vserver!1!rule!300!match!directory = / post29 vserver!1!rule!300!match!directory = /%s 7 10 vserver!1!rule!300!handler = cgi 8 """ 11 """ % (DIR) 12 13 CGI_BASE = """#!/bin/sh 14 echo "Content-Type: text/plain" 15 echo 16 echo '%s' 17 """ % (MAGIC) 9 18 10 19 class Test (TestBase): … … 13 22 self.name = "Post with length zero" 14 23 15 self.conf = CONF 16 self.request = "POST /post2/test HTTP/1.0\r\n" +\ 17 "Content-type: application/x-www-form-urlencoded\r\n" +\ 18 "Content-length: 0\r\n" 19 self.post = "" 20 self.expected_error = 200 24 self.request = "POST /%s/test HTTP/1.0\r\n" % (DIR)+\ 25 "Content-type: application/x-www-form-urlencoded\r\n" +\ 26 "Content-length: 0\r\n" 27 self.post = "" 28 self.conf = CONF 29 self.expected_error = 200 30 self.expected_content = MAGIC 21 31 22 32 def Prepare (self, www): 23 self.Mkdir (www, "post2") 24 self.WriteFile (www, "post2/test", 0755, 25 """#!/bin/sh 33 d = self.Mkdir (www, DIR) 34 self.WriteFile (d, "test", 0755, CGI_BASE) 26 35 27 echo "Content-Type: text/plain"28 echo29 echo ok30 """)31