summaryrefslogtreecommitdiffstats
path: root/Lib/dos-8x3/simpleht.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-09-01 19:25:51 (GMT)
committerGuido van Rossum <guido@python.org>2000-09-01 19:25:51 (GMT)
commit8d691c842289cf4453f282637765f07113a7cc17 (patch)
tree3a7819d53d7578cf728d3bcfecba7daebb6981db /Lib/dos-8x3/simpleht.py
parent29201d490511b2af863e07fdf5cb247fc9117c2f (diff)
downloadcpython-8d691c842289cf4453f282637765f07113a7cc17.zip
cpython-8d691c842289cf4453f282637765f07113a7cc17.tar.gz
cpython-8d691c842289cf4453f282637765f07113a7cc17.tar.bz2
The usual
Diffstat (limited to 'Lib/dos-8x3/simpleht.py')
-rwxr-xr-xLib/dos-8x3/simpleht.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/dos-8x3/simpleht.py b/Lib/dos-8x3/simpleht.py
index 7125413..8a77758 100755
--- a/Lib/dos-8x3/simpleht.py
+++ b/Lib/dos-8x3/simpleht.py
@@ -15,6 +15,7 @@ import posixpath
import BaseHTTPServer
import urllib
import cgi
+import shutil
from StringIO import StringIO
@@ -151,12 +152,7 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
to copy binary data as well.
"""
-
- BLOCKSIZE = 8192
- while 1:
- data = source.read(BLOCKSIZE)
- if not data: break
- outputfile.write(data)
+ shutil.copyfileobj(source, outputfile)
def guess_type(self, path):
"""Guess the type of a file.