[issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink

2020-06-18 Thread Chris AtLee
Change by Chris AtLee : -- pull_requests: +20149 pull_request: https://github.com/python/cpython/pull/20972 ___ Python tracker <https://bugs.python.org/issue12

[issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink

2020-05-17 Thread Chris AtLee
Chris AtLee added the comment: It's caused by the combination of the symlink existing, and having the tarfile opened in r| mode. If I run the attached test file in a fresh directory, I get the following exception: raceback (most recent call last): File "/home/catlee/.pyenv/versions/

[issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink

2020-05-16 Thread Chris AtLee
Chris AtLee added the comment: Is there anything I can do to help get this landed? The PR in github works for me. -- nosy: +catlee ___ Python tracker <https://bugs.python.org/issue12

[issue19217] Calling assertEquals for moderately long list takes too long

2016-02-05 Thread Chris AtLee
Chris AtLee added the comment: Switching this to unified_diff allows the test case to finish nearly instantly. The downside is that the output is changed in the case of a difference found: FF == FAIL: test_compare (__main__

[issue19217] Calling assertEquals for moderately long list takes too long

2016-02-05 Thread Chris AtLee
Changes by Chris AtLee <chris.at...@gmail.com>: Added file: http://bugs.python.org/file41824/cpython-issue19217.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-15 Thread Chris AtLee
Chris AtLee added the comment: Thanks, your patch is definitely much simpler! I was worried about the case where you have interrupted \r\n that appears in the middle of the content. But that case is handled by the next readline(), which returns a single \n. One question about the tests

[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-10 Thread Chris AtLee
Chris AtLee added the comment: To demonstrate how to hit this in a real use case, run the attached script which implements a simple http server that saves POSTed files to a local file got_data. It returns the sha1sum of the POSTed file as the http response. Then, create a test file consisting

[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-07 Thread Chris AtLee
New submission from Chris AtLee: cgi.FieldStorage uses fp.readline(1 16) to read in POSTed file data if no content length has been specified. All HTTP clients I've looked at terminate the file body with CRLF and then the final MIME boundary. If the file body is 65,535 bytes, and doesn't

[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-07 Thread Chris AtLee
Chris AtLee added the comment: This is a possible fix to this issue. It's not as clean as I'd like, but the simpler versions I tried could end up with the entire file contents in memory for degenerate (or malicious) inputs. The trick is handling the case where the current line ends with \r

[issue3243] Support iterable bodies in httplib

2008-12-05 Thread Chris AtLee
Chris AtLee [EMAIL PROTECTED] added the comment: The attached patch implements this for python 2.7. It also adds support for iterable bodies in urllib2, where it is more generally useful. urllib2 enforces the presence of a Content-Length header in the request if the body is an iterable

[issue3244] multipart/form-data encoding

2008-11-24 Thread Chris AtLee
Chris AtLee [EMAIL PROTECTED] added the comment: I also wrote some software to handle this: http://atlee.ca/software/poster/poster.encode.html The reason I wrote this is to avoid having the load the entire file into memory before posting the request. This, along with Issue #3243, would allow

[issue3730] Update BaseHTTPServer docs

2008-08-29 Thread Chris AtLee
New submission from Chris AtLee [EMAIL PROTECTED]: The BaseHTTPServer docs don't mention 'server' as an instance variable in the instance variable section for BaseHTTPRequestHandler. It is mentioned in passing a few paragraphs above in the BaseHTTPServer class description, but it's too easy

[issue3243] Support iterable bodies in httplib

2008-06-30 Thread Chris AtLee
New submission from Chris AtLee [EMAIL PROTECTED]: httplib should support requests whose bodies are iterable objects. This would facilitate doing large file uploads via HTTP since you wouldn't have to load the entire file into memory to create the request string. Index: Lib/httplib.py

[issue3244] multipart/form-data encoding

2008-06-30 Thread Chris AtLee
New submission from Chris AtLee [EMAIL PROTECTED]: The standard library should provide a way to encode data using the standard multipart/form-data encoding. This encoding is required to support file uploads via HTTP POST (or PUT) requests. Ideally file data could be streamed to the remote

[issue3224] Small typo in 2.6 what's new

2008-06-27 Thread Chris AtLee
New submission from Chris AtLee [EMAIL PROTECTED]: Index: Doc/whatsnew/2.6.rst === --- Doc/whatsnew/2.6.rst(revision 64571) +++ Doc/whatsnew/2.6.rst(working copy) @@ -1284,7 +1284,7 @@ Here are all of the changes

[issue1673409] datetime module missing some important methods

2007-12-01 Thread Chris AtLee
Chris AtLee added the comment: timedelta.todays() could be useful in general I suppose. I think timedelta.toweeks() could be omitted since it's simple division by an easy to recognize constant...also the timedelta docs say that it stores data in terms of microseconds, seconds, and days. OTOH

[issue1673409] datetime module missing some important methods

2007-11-30 Thread Chris AtLee
Chris AtLee added the comment: I keep needing to know the number of seconds that a timedelta represents, so I implemented the following patch. This returns only the integer portion, but could be modified to return a floating point value. -- nosy: +catlee Added file: http