Update cherrypy==18.9.0

This commit is contained in:
JonnyWong16 2024-03-24 17:55:12 -07:00
parent 2fc618c01f
commit 51196a7fb1
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
137 changed files with 44442 additions and 11582 deletions

View file

@ -136,6 +136,9 @@ class HTTPTests(helper.CPWebCase):
self.assertStatus(200)
self.assertBody(b'Hello world!')
response.close()
c.close()
# Now send a message that has no Content-Length, but does send a body.
# Verify that CP times out the socket and responds
# with 411 Length Required.
@ -159,6 +162,9 @@ class HTTPTests(helper.CPWebCase):
self.status = str(response.status)
self.assertStatus(411)
response.close()
c.close()
def test_post_multipart(self):
alphabet = 'abcdefghijklmnopqrstuvwxyz'
# generate file contents for a large post
@ -184,6 +190,9 @@ class HTTPTests(helper.CPWebCase):
parts = ['%s * 65536' % ch for ch in alphabet]
self.assertBody(', '.join(parts))
response.close()
c.close()
def test_post_filename_with_special_characters(self):
"""Testing that we can handle filenames with special characters.
@ -217,6 +226,9 @@ class HTTPTests(helper.CPWebCase):
self.assertStatus(200)
self.assertBody(fname)
response.close()
c.close()
def test_malformed_request_line(self):
if getattr(cherrypy.server, 'using_apache', False):
return self.skip('skipped due to known Apache differences...')
@ -264,6 +276,9 @@ class HTTPTests(helper.CPWebCase):
self.body = response.fp.read(20)
self.assertBody('Illegal header line.')
response.close()
c.close()
def test_http_over_https(self):
if self.scheme != 'https':
return self.skip('skipped (not running HTTPS)... ')