Senthil Kumaran
3853586e0c
Fix issue11442 - Add a charset parameter to the Content-type to avoid XSS attacks.
Patch by Tom N. (Backported from py3k codeline).
15 years ago
Amaury Forgeot d'Arc
0f7cddc308
Issue839496: SimpleHTTPServer should open all files in binary mode.
Forward-port of 38255 (2005/01/15!)
This was already fixed in 2.4, but never merged into trunk...
py3k is already right, thanks to the bytes/str distinction!
Should be backported to 2.5.
18 years ago
Andrew M. Kuchling
a6298528e1
#2169 : make generated HTML more valid
18 years ago
Christian Heimes
c5f05e45cf
Patch #2167 from calvin: Remove unused imports
18 years ago
Facundo Batista
d14600ec94
Issue 1224. Now we support again the double slash in the URL.
Thanks Anthony Lenton.
18 years ago
Andrew M. Kuchling
60775f29de
[Patch #827559 from Chris Gonnerman] Make SimpleHTTPServer redirect when a directory URL is missing the trailing slash; this lets relative links work.
19 years ago
Andrew M. Kuchling
4281902545
[Patch #827559 from Chris Gonnerman] Make SimpleHTTPServer redirect when a directory URL is missing the trailing slash; this lets relative links work.
19 years ago
Tim Peters
5d538b603f
Whitespace normalization.
20 years ago
Georg Brandl
83cc0d0add
Bug #1117556 : SimpleHTTPServer now tries to find and use the system's
mime.types file for determining MIME types.
20 years ago
Georg Brandl
5d076961e2
Patch #1417555 : SimpleHTTPServer now returns Last-Modified headers.
20 years ago
Georg Brandl
45ab233935
Bug #1394565 : SimpleHTTPServer now doesn't choke on query paramters
any more.
20 years ago
Georg Brandl
6ee6952eb2
Patch #1360443 : Make SimpleHTTPServer display unencoded directory names.
20 years ago
Raymond Hettinger
a617271dbd
Use cStringIO where available.
21 years ago
Johannes Gijsbers
6d63a8dd09
Patch #1011123 : Use urllib.quote() instead of cgi.escape() for encoding the
href attribute in list_directory(). This fixes the links for legal Unix
filenames such as 'a"b'.
22 years ago
Andrew M. Kuchling
b839c1f33f
[Bug #866222 ] Update docstrings.
22 years ago
Raymond Hettinger
6b59f5f3fd
Let library modules use the new keyword arguments for list.sort().
23 years ago
Raymond Hettinger
54f0222547
SF 563203. Replaced 'has_key()' with 'in'.
24 years ago
Martin v. Löwis
587c98c863
Patch #430706 : Persistent connections in BaseHTTPServer.
24 years ago
Eric S. Raymond
304b6a3225
Correction after translation test.
25 years ago
Eric S. Raymond
bf97c9d87b
String method conversion.
25 years ago
Jeremy Hylton
5b48c45736
unnecessary semicolon
25 years ago
Skip Montanaro
e99d5ea25b
added __all__ lists to a number of Python modules
added test script and expected output file as well
this closes patch 103297.
__all__ attributes will be added to other modules without first submitting
a patch, just adding the necessary line to the test script to verify
more-or-less correct implementation.
25 years ago
Guido van Rossum
077153e973
- Use mimetypes.types_map to initialize extensions_map.
- Change the default file type to application/octet-stream.
- Add support to recognize .py, .c, .h files as text/plain (this is
what I use most :-).
25 years ago
Guido van Rossum
1d105d15d3
For this server to work on Windows, directories should use "/" as the
separator in the href, not os.sep.
Added a <title> tag to directory listings.
Bumped version to 0.5.
26 years ago
Moshe Zadka
37c03ff3a9
Using shutil's function to copy data between file objects instead
of rolling our own.
Note:
This is my first sourceforge checkin. If you see anything funny about
this patch, please let me know.
26 years ago
Guido van Rossum
1d10f3eac2
Changed list_directory() somewhat. It is now only called when there
is no index.htm[l] file, and when it is called, it also spits out the
headers. When an index.htm[l] file is present, the regular (file
access) path is followed. Also, when the guessed content-type matches
text/*, open the file in text mode; otherwise in binary mode.
26 years ago
Guido van Rossum
57af072e5c
Add a simple directory listing function.
26 years ago
Guido van Rossum
d7b147b040
Moshe Zadka writes: When deploying SimpleHTTPServer, I noticed a
problem: it does not encode/decode the urls, which is wrong.
27 years ago
Guido van Rossum
f8fd11d039
No need to import sys, time, socket or SocketServer. (Andrew Dalke & kjpylint)
27 years ago
Guido van Rossum
5c3b384a85
Patch by Jeff Rush:
In SimpleHTTPServer.py, the server specified in test() should
be BaseHTTPServer.HTTPServer, in case the request handler should
want to reference the two attributes added by
BaseHTTPServer.server_bind:
self.server_name = hostname
self.server_port = port
There was some Bobo CGI code that wanted access to those attributes.
27 years ago
Guido van Rossum
391c8b4ea2
Open the file in binary mode -- so serving images from a Windows box
might actually work.
27 years ago
Guido van Rossum
45e2fbc2e7
Mass check-in after untabifying all files that need it.
28 years ago
Guido van Rossum
f469d5b05d
Get rid of nobody_uid() and import pwd -- not used here.
30 years ago
Guido van Rossum
3b7b8131a6
recognize a few more file types
31 years ago
Guido van Rossum
e7e578ffe0
Initial revision
31 years ago