- 29 Jun, 2002 7 commits
-
-
Barry Warsaw authored
New test cases.
-
Barry Warsaw authored
Specifically, decode_rfc2231(), encode_rfc2231(): Functions to encode and decode RFC 2231 style parameters. decode_params(): Function to decode a list of parameters.
-
Barry Warsaw authored
Specifically, _formatparam(): Teach this about encoded `param' arguments, which are a 3-tuple of items (charset, language, value). language is ignored. _unquotevalue(): Handle both 3-tuple RFC 2231 values and unencoded values. _get_params_preserve(): Decode the parameters before returning them. get_params(), get_param(): Use _unquotevalue(). get_filename(), get_boundary(): Teach these about encoded (3-tuple) parameters.
-
Barry Warsaw authored
-
Barry Warsaw authored
modified by Barry.
-
Greg Ward authored
-
Greg Ward authored
-
- 28 Jun, 2002 13 commits
-
-
Jeremy Hylton authored
-
Barry Warsaw authored
folding. Note that some of the Japanese tests have changed, but I don't really know if they are correct or not. :( Someone with Japanese and RFC 2047 expertise, please take a look!
-
Barry Warsaw authored
be lstrip'd so that old continuation whitespace is replaced by that specified in Header's continuation_ws parameter.
-
Barry Warsaw authored
headers with no charset or 'us-ascii' charsets. Actually this is only partially true: we know about semicolons (but not true parameters) and we know about whitespace (but not technically folding whitespace). Still it should be good enough for all practical purposes. Other changes include: __init__(): Add a continuation_ws argument, which defaults to a single space. Set this to change the whitespace used for continuation lines when a header must be split. Also, changed the way header line lengths are calculated, so that they take into account continuation_ws (when tabs-expanded) and any provided header_name parameter. This should do much better on returning split headers for which the first and subsequent lines must fit into a specified width. guess_maxlinelen(): Removed. I don't think we need this method as part of the public API. encode_chunks() -> _encode_chunks(): I don't think we need this one as part of the public API either.
-
Barry Warsaw authored
know anything about RFC 2047 encoded headers. Fortunately we have a perfectly good header splitter in Header.encode(). So we just call that to give us a properly formatted and split header. Header.encode() didn't know about "highest-level syntactic breaks" but that's been fixed now too.
-
Jeremy Hylton authored
See discussion in SF bug 458463.
-
Jeremy Hylton authored
Didn't use the patch, because universal newlines support made it easy. It might be worth fixing the actual problem in the 2.2 maintenance branch, in which case the patch is still needed.
-
Fred Drake authored
Setting the buffer_text attribute to true causes the parser to collect character data, waiting as long as possible to report it to the Python callback. This can save an enormous number of callbacks from C to Python, which can be a substantial performance improvement. buffer_text defaults to false.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
The HTTPResponse class now handles 100 continue responses, instead of choking on them. It detects them internally in the _begin() method and ignores them. Based on a patch by Bob Kline. This closes SF bugs 498149 and 551273. The FakeSocket class (for SSL) is now usable with HTTP/1.1 connections. The old version of the code could not work with persistent connections, because the makefile() implementation read until EOF before returning. If the connection is persistent, the server sends a response and leaves the connection open. A client that reads until EOF will block until the server gives up on the connection -- more than a minute in my test case. The problem was fixed by implementing a reasonable makefile(). It reads data only when it is needed by the layers above it. It's implementation uses an internal buffer with a default size of 8192. Also, rename begin() method of HTTPResponse to _begin() because it should only be called by the HTTPConnection.
-
Fred Drake authored
The handlers array on each parser now has the invariant that None will never be set as a handler; it will always be NULL or a Python-level value passed in for the specific handler. have_handler(): Return true if there is a Python handler for a particular event. get_handler_name(): Return a string object giving the name of a particular handler. This caches the string object so it doesn't need to be created more than once. get_parse_result(): Helper to allow the Parse() and ParseFile() methods to share the same logic for determining the return value or exception state. PyUnknownEncodingHandler(), PyModule_AddIntConstant(): Made these helpers static. (The later is only defined for older versions of Python.) pyxml_UpdatePairedHandlers(), pyxml_SetStartElementHandler(), pyxml_SetEndElementHandler(), pyxml_SetStartNamespaceDeclHandler(), pyxml_SetEndNamespaceDeclHandler(), pyxml_SetStartCdataSection(), pyxml_SetEndCdataSection(), pyxml_SetStartDoctypeDeclHandler(), pyxml_SetEndDoctypeDeclHandler(): Removed. These are no longer needed with Expat 1.95.x. handler_info: Use the setter functions provided by Expat 1.95.x instead of the pyxml_Set*Handler() functions which have been removed. Minor code formatting changes for consistency. Trailing whitespace removed.
-
Neil Schemenauer authored
collected one should be zeroed.
-
Mark Hammond authored
extension.
-
- 27 Jun, 2002 10 commits
-
-
Jack Jansen authored
-
Jack Jansen authored
the "standard" modules. Unfinished, but shouldn't harm anything.
-
Jack Jansen authored
in building various modules.
-
Fredrik Lundh authored
-
Fredrik Lundh authored
-
Fredrik Lundh authored
This should be backported to the 2.2.X series (how do I do that?)
-
Fred Drake authored
revision 1.12 in PyXML).
-
Fred Drake authored
1.47, 1.48, 1.49 (name interning support).
-
Fred Drake authored
environments.
-
Fred Drake authored
-
- 26 Jun, 2002 10 commits
-
-
Neal Norwitz authored
-
Jack Jansen authored
these scripts work with the new precompiled headers.
-
Neal Norwitz authored
-
Fred Drake authored
-
Fred Drake authored
-
Jack Jansen authored
-
Jack Jansen authored
definition.
-
Jack Jansen authored
-
Jack Jansen authored
-
Jack Jansen authored
header files. If we're building with precompiled headers these are in scope.
-