cpython/Lib
Barry Warsaw da2525ed2a parse(), _parseheaders(), _parsebody(): A fix for SF bug #633527,
where in lax parsing, the first non-header line after a header block
(e.g. the first line not containing a colon, and not a continuation),
can be treated as the first body line, even without the RFC mandated
blank line separator.

rfc822 had this behavior, and I vaguely remember problems with this,
but can't remember details.  In any event, all the tests still pass,
so I guess we'll find out. ;/

This patch works by returning the non-header, non-continuation line
from _parseheader() and using that as the first header line prepended
to fp.read() if given.  It's usually None.

We use this approach instead of trying to seek/tell the file-like
object.
2002-11-05 21:44:06 +00:00
..
compiler Remove uses of string module and stat.ST_MODE 2002-06-06 18:30:10 +00:00
curses Whitespace normalization (get rid of tabs). 2002-09-29 00:25:51 +00:00
distutils Repair inconsistent use of tabs and spaces. 2002-11-05 20:27:17 +00:00
email parse(), _parseheaders(), _parsebody(): A fix for SF bug #633527, 2002-11-05 21:44:06 +00:00
encodings Add new encoding for Ukrainian Cyrillic 2002-10-17 22:15:33 +00:00
hotshot Massive changes from SF 589982 (tempfile.py rewrite, by Zack 2002-08-09 16:38:32 +00:00
idlelib Set breakpoints on remote debugger 2002-11-04 23:39:45 +00:00
lib-old
lib-tk Patch #621891: Add askopenfile{name}s. 2002-10-13 10:28:04 +00:00
plat-aix3
plat-aix4
plat-atheos Patch #488073: AtheOS port. 2002-06-11 06:22:31 +00:00
plat-beos5
plat-freebsd2
plat-freebsd3
plat-freebsd4
plat-freebsd5
plat-generic
plat-irix5 Fix a typo in the mktemp -> mkstemp patch. 2002-08-10 00:17:59 +00:00
plat-irix6 Fix a typo in the mktemp -> mkstemp patch. 2002-08-10 00:17:59 +00:00
plat-linux1
plat-linux2
plat-netbsd1
plat-next3
plat-os2emx
plat-riscos
plat-sunos4
plat-sunos5
plat-unixware7
site-packages
test This is Alex Martelli's patch 2002-11-05 17:38:05 +00:00
xml Minor simplification. 2002-10-28 18:09:41 +00:00
BaseHTTPServer.py
Bastion.py
CGIHTTPServer.py Must catch TypeError from int(length). 2002-10-17 16:21:35 +00:00
ConfigParser.py Implement a safer and more predictable interpolation approach. 2002-10-25 21:52:00 +00:00
Cookie.py Apply SF 562987 modernizing Cookie to subclass from dict instead of UserDict 2002-06-26 15:19:01 +00:00
FCNTL.py
HTMLParser.py
MimeWriter.py
Queue.py Patch #572628: Optional timeouts for put and get. 2002-10-15 15:11:13 +00:00
SimpleHTTPServer.py
SimpleXMLRPCServer.py
SocketServer.py Replace 0 with False to match working in documentation. SF 599681. 2002-08-25 16:36:49 +00:00
StringIO.py write(): Special case the common situation of a stream that's only 2002-09-17 18:10:34 +00:00
TERMIOS.py
UserDict.py
UserList.py
UserString.py Moved inplace add and multiply methods from UserString to MutableString. 2002-08-09 01:37:06 +00:00
__future__.py
__phello__.foo.py
_strptime.py Brett's fixes for various bugs and coding issues. Closes SF patch # 2002-09-23 22:46:49 +00:00
aifc.py Fix wanrings about unsigned hex constants. 2002-08-12 22:11:28 +00:00
anydbm.py
asynchat.py Code modernization. Replace v=s[i]; del s[i] with single lookup v=s.pop(i) 2002-06-30 03:39:14 +00:00
asyncore.py Fix an old bug in poll(). When a signal is handled while we're 2002-11-05 18:41:20 +00:00
atexit.py The atexit module effectively turned itself off if sys.exitfunc already 2002-07-16 19:30:59 +00:00
audiodev.py
base64.py
bdb.py
binhex.py
bisect.py
calendar.py Patches #626105: 2002-10-22 05:15:17 +00:00
cgi.py Patch suggested by Hamish Lawson: add an __iter__() that returns 2002-09-11 18:20:34 +00:00
cgitb.py Massive changes from SF 589982 (tempfile.py rewrite, by Zack 2002-08-09 16:38:32 +00:00
chunk.py
cmd.py Code modernization. Replace v=s[i]; del s[i] with single lookup v=s.pop(i) 2002-06-30 03:39:14 +00:00
code.py
codecs.py PEP 293 implemention (from SF patch http://www.python.org/sf/432401) 2002-09-02 13:14:32 +00:00
codeop.py
colorsys.py
commands.py
compileall.py
copy.py Make sure that *any* object whose id() is used as a memo key is kept 2002-08-12 20:20:08 +00:00
copy_reg.py
dbhash.py
difflib.py Added missing names to __all__. 2002-10-30 06:09:58 +00:00
dircache.py
dis.py Further SET_LINENO reomval fixes. See comments in patch #587933. 2002-08-30 13:09:51 +00:00
doctest.py
dumbdbm.py
filecmp.py Replaced .keys() with dictionary iterators 2002-06-02 18:55:56 +00:00
fileinput.py tightening up a few except: clauses 2002-08-14 02:58:16 +00:00
fnmatch.py
formatter.py Remove uses of the string and types modules: 2002-06-03 15:58:32 +00:00
fpformat.py
ftplib.py Fix a regression from the 1.68->1.69 checkin: 2002-06-03 10:41:45 +00:00
getopt.py Add encoding declaration. 2002-08-04 17:22:59 +00:00
getpass.py
gettext.py Patch by Tim to shut up the compiler's DeprecationWarnings on the 2002-08-14 15:09:12 +00:00
glob.py
gopherlib.py
gzip.py Another round on SF patch 618135: gzip.py and files > 2G 2002-11-05 20:38:55 +00:00
heapq.py Added __all__. 2002-10-30 06:15:53 +00:00
hmac.py Remove uses of the string and types modules: 2002-06-03 15:58:32 +00:00
htmlentitydefs.py
htmllib.py
httplib.py Move code for reading chunked responses in helper function, 2002-09-03 20:49:06 +00:00
ihooks.py
imaplib.py Added missing class to __all__. 2002-10-30 06:20:37 +00:00
imghdr.py
imputil.py Close SF patch 523944: importing modules with foreign newlines. 2002-06-28 23:32:51 +00:00
inspect.py This is my patch 2002-08-15 14:59:02 +00:00
keyword.py Patrick K. O'Brien notices that kwlist was missing from __all__. 2002-10-30 05:17:22 +00:00
linecache.py
locale.py This stopped working on Windows, due to a reference to the non-existent 2002-11-05 03:49:09 +00:00
macpath.py Add os.path.supports_unicode_filenames for all platforms, 2002-10-08 02:44:31 +00:00
macurl2path.py
mailbox.py Undocumented feature: MHMailbox sets the msg object's _mh_msgno 2002-09-12 05:08:00 +00:00
mailcap.py Replaced .keys() with dictionary iterators 2002-06-02 18:55:56 +00:00
markupbase.py Remove uses of the string and types modules: 2002-06-03 15:58:32 +00:00
mhlib.py Replace .keys() with .iteritems(). Second review and test by Alex. 2002-06-04 02:17:04 +00:00
mimetools.py Massive changes from SF 589982 (tempfile.py rewrite, by Zack 2002-08-09 16:38:32 +00:00
mimetypes.py Apply diff3.txt (plus additional documentation) 2002-09-06 16:15:58 +00:00
mimify.py
multifile.py Back out multifile.py 1.19 and 1.20. Fixes #514676. 2002-09-22 09:01:08 +00:00
mutex.py Code modernization. Replace v=s[i]; del s[i] with single lookup v=s.pop(i) 2002-06-30 03:39:14 +00:00
netrc.py
new.py Forgot to add this. It's part of patch 568629. 2002-06-16 01:22:13 +00:00
nntplib.py Remove uses of the string and types modules: 2002-06-03 15:58:32 +00:00
ntpath.py Don't try to access sys.getwindowsversion unless it exists (ntpath is 2002-10-09 07:56:04 +00:00
nturl2path.py
os.py Remove more DOS support. 2002-10-09 17:23:29 +00:00
os2emxpath.py Add os.path.supports_unicode_filenames for all platforms, 2002-10-08 02:44:31 +00:00
pdb.doc
pdb.py At Jim Fulton's request, increase the maxstring value of _saferepr to 2002-09-10 21:57:14 +00:00
pickle.py Fiddle comments and variable names in whichmodule(). 2002-09-19 23:00:12 +00:00
pipes.py Massive changes from SF 589982 (tempfile.py rewrite, by Zack 2002-08-09 16:38:32 +00:00
popen2.py Remove uses of the string and types modules: 2002-06-03 15:58:32 +00:00
poplib.py
posixfile.py
posixpath.py Add os.path.supports_unicode_filenames for all platforms, 2002-10-08 02:44:31 +00:00
pprint.py Change the "__ private" names to "_ protected"; this has been a pain for 2002-07-08 12:28:06 +00:00
pre.py Fix bug #570057: Broken pre.subn() (and pre.sub()) 2002-06-27 19:59:27 +00:00
profile.doc
profile.py Replaced .keys() with dictionary iterators 2002-06-02 18:55:56 +00:00
pstats.py Replaced .keys() with dictionary iterators 2002-06-02 18:55:56 +00:00
pty.py Patch #581705: Catch OSError, termios.error in spawn. 2.2 bugfix candidate. 2002-07-28 09:42:57 +00:00
py_compile.py Added a main() function and support to run this module as a script. 2002-08-21 20:56:21 +00:00
pyclbr.py When recursively attempting to find the modules imported by an 2002-09-16 16:36:02 +00:00
pydoc.py Correct erroneous parenthesis placement in the delta from 1.63 to 1.64. 2002-11-02 02:02:46 +00:00
quopri.py
random.py SF bug 594996: OverflowError in random.randrange 2002-08-16 03:41:39 +00:00
re.py point people to the Python bug tracker, rather than to a mail 2002-10-19 20:19:10 +00:00
reconvert.py
regex_syntax.py
regsub.py
repr.py
rexec.py Allow restricted code to get byteorder, getdefaultencoding(), 2002-10-11 16:20:45 +00:00
rfc822.py unquote(): Didn't properly de-backslash-ify. This patch (adapted from 2002-09-11 02:32:14 +00:00
rlcompleter.py Remove uses of the string and types modules: 2002-06-03 15:58:32 +00:00
robotparser.py
sched.py
sets.py .iterkeys() is not needed. 2002-10-04 20:01:48 +00:00
sgmllib.py Replace boolean test with is None. 2002-06-02 00:40:05 +00:00
shelve.py Patch #624936: Implement __contains__. 2002-10-18 08:58:14 +00:00
shlex.py Replace boolean test with is None. 2002-06-02 00:40:05 +00:00
shutil.py Added new move() function to __all__. 2002-10-30 05:44:50 +00:00
site.py Fix a problem in site.py which triggers in case sys.path is empty. 2002-09-19 11:11:27 +00:00
smtpd.py
smtplib.py Patch #572031: AUTH method LOGIN for smtplib 2002-10-06 17:55:08 +00:00
sndhdr.py
socket.py On Windows, make sure SocketType is the same as socket. (SF bug 2002-08-22 17:31:16 +00:00
sre.py Add finditer to __all__ (when defining it at all). 2002-10-14 12:22:17 +00:00
sre_compile.py Disable big charsets in UCS-4 builds. Works around #599377. 2002-09-26 16:39:20 +00:00
sre_constants.py
sre_parse.py Replace boolean test with is None. 2002-06-02 00:40:05 +00:00
stat.py
statcache.py
statvfs.py
string.py Convert empty string literal to string. Speed up creation of idmap. 2002-10-14 20:03:40 +00:00
stringold.py
sunau.py
sunaudio.py
symbol.py Updates to track Grammar changes. The patch to token.py loosens the regexp to 2002-10-03 09:42:01 +00:00
symtable.py Replaced .keys() with dictionary iterators 2002-06-02 18:55:56 +00:00
tabnanny.py
telnetlib.py Patch #625823: Add symbolic constants for more commands. 2002-11-04 17:34:07 +00:00
tempfile.py Get rid of _once(); inlining it takes less code. :-) 2002-08-17 14:50:24 +00:00
textwrap.py Add comment about inability to handle Unicode strings (hopefully a 2002-10-22 18:31:50 +00:00
this.py
threading.py Docstring nits: The module is neither proposed nor new. 2002-08-14 19:25:42 +00:00
toaiff.py Fix a typo in the mktemp -> mkstemp patch. 2002-08-10 00:17:59 +00:00
token.py Updates to track Grammar changes. The patch to token.py loosens the regexp to 2002-10-03 09:42:01 +00:00
tokenize.py SF 633560: tokenize.__all__ needs "generate_tokens" 2002-11-05 06:06:02 +00:00
traceback.py This is my patch 2002-08-15 14:59:02 +00:00
tty.py
types.py SF patch 568629 by Oren Tirosh: types made callable. 2002-06-14 20:41:17 +00:00
tzparse.py
unittest.py Now that TestCase is a new-style class, change loadTestsFromModule and 2002-09-30 19:25:56 +00:00
urllib.py Use fdopen() to create file from fd. 2002-10-11 14:36:24 +00:00
urllib2.py Typo in docstring 2002-10-11 17:27:55 +00:00
urlparse.py Added missing entries to __all__. 2002-10-16 21:21:39 +00:00
user.py SF # 555779, import user doesn't work with CGIs 2002-09-05 21:08:25 +00:00
uu.py
warnings.py Allow Unicode strings as message and module name. 2002-10-14 21:06:02 +00:00
wave.py
weakref.py Whitespace normalization. 2002-07-16 21:35:23 +00:00
webbrowser.py SF # 539360, webbrowser.py and konqueror, by Andy McKay 2002-10-11 22:04:22 +00:00
whichdb.py catch the situation where Berkeley DB is used to emulate dbm(3) library 2002-08-02 17:12:15 +00:00
whrandom.py
xdrlib.py
xmllib.py
xmlrpclib.py patch #624180 (part 2 of 2): 2002-11-01 17:14:16 +00:00
zipfile.py Patch #611760: read archives with comments. 2002-10-13 13:54:50 +00:00