Commits

Robert Brewer  committed b31b212

And another readline test, this time for know length request bodies.

  • Participants
  • Parent commits 39923f5

Comments (0)

Files changed (1)

File cheroot/test/test_core.py

         self.assertStatus(200)
         self.assertBody(body)
 
+    def test_request_payload_readline(self):
+        if self.scheme == "https":
+            c = HTTPSConnection('%s:%s' % (self.interface(), self.PORT))
+        else:
+            c = HTTPConnection('%s:%s' % (self.interface(), self.PORT))
+        c.putrequest("POST", "/echo_lines")
+        body = ntob("I am a\nrequest body")
+        c.putheader("Content-Length", len(body))
+        c.endheaders()
+        c.send(body)
+        response = c.getresponse()
+        self.body = response.read()
+        c.close()
+        self.status = str(response.status)
+        self.assertStatus(200)
+        self.assertBody(body)
+
     def test_chunked_request_payload(self):
         if self.scheme == "https":
             c = HTTPSConnection('%s:%s' % (self.interface(), self.PORT))