Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2415)

Unified Diff: net/tools/testserver/testserver.py

Issue 12025040: When reading from an SSL socket, attempt to fully fill the caller's buffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/testserver/testserver.py
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py
index d442671085fa2acebd94c70b435b871b52cd642a..0fe9bd785676375ed6b582ed1decc5876b614e35 100755
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -265,6 +265,7 @@ class TestPageHandler(testserver_base.BasePageHandler):
self.MultipartHandler,
self.MultipartSlowHandler,
self.GetSSLSessionCacheHandler,
+ self.SSLManySmallRecords,
self.CloseSocketHandler,
self.RangeResetHandler,
self.DefaultResponseHandler]
@@ -1408,6 +1409,24 @@ class TestPageHandler(testserver_base.BasePageHandler):
' this request')
return True
+ def SSLManySmallRecords(self):
+ """Sends a reply consisting of a variety of small writes. These will be
+ translated into a series of small SSL records when used over an HTTPS
+ server."""
+
+ if not self._ShouldHandleRequest('/ssl-many-small-records'):
+ return False
+
+ self.send_response(200)
+ self.send_header('Content-Type', 'text/plain')
+ self.end_headers()
+
+ # Write ~26K of data, in 1350 byte chunks
+ for i in xrange(20):
+ self.wfile.write('*' * 1350)
+ self.wfile.flush()
+ return True
+
def CloseSocketHandler(self):
"""Closes the socket without sending anything."""
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698