Re: [jira] Commented: (MODPYTHON-222) Support for chunked transfer encoding on request content.

2007-07-02 Thread Mike Looijmans
bytes. If it reads less, it's at the end of the stream. Blocks until the requested amount has been read. req.read() - reads all data from the stream (bad idea), blocks until EOS. req.read(None) - reads the next chunk of data, blocks if no data available. Returns 0 size if at EOS. Mike

[jira] Commented: (MODPYTHON-93) Improve util.FieldStorage efficiency

2006-10-26 Thread Mike Looijmans (JIRA)
[ http://issues.apache.org/jira/browse/MODPYTHON-93?page=comments#action_12444850 ] Mike Looijmans commented on MODPYTHON-93: - A very simple approach would be to delete the dictionary attribute when any change is made. The add_field

Re: [jira] Commented: (MODPYTHON-93) Improve util.FieldStorage efficiency

2006-09-11 Thread Mike Looijmans
so that it could be publicly available. (side thought: Allowing population from code rather than only from a Request object might allow FieldStorage to be used in test code) -- Mike Looijmans Philips Natlab / Topic Automation Graham Dumpleton (JIRA) wrote: [ http://issues.apache.org/jira

Adding to FieldStorage

2006-06-28 Thread Mike Looijmans
* How are applications supposed to perform write operations on a FieldStorage, in 3.3 and the future? Since we claim that FieldStorage behaves like a dictionary, the obvious syntax would be: form['mykey'] = 'value' This would require a __setitem__ method which should look something like this

Re: wepy

2006-04-20 Thread Mike Looijmans
import sys sys.stdout.write(open('penguin.png', 'rb').read()) NO. NO. NO. sys.stdout is a global variable. If you want sys.stdout.write() to end up in the user's terminal, your web server will be able to either serve only one request at a time, or must be forced into running separate

Re: wepy

2006-04-20 Thread Mike Looijmans
to sys.stdout (sys.stdout.buffer == hello2 world1) - terminates, and sends sys.stdout.buffer to client ##Thread 2 - writes world2 to sys.stdout (sys.stdout.buffer == hello2 world1world2) - terminates, and sends sys.stdout.buffer to client Mike Looijmans Philips Natlab / Topic Automation Fırat

Re: FieldStorage and multiline headers in multipart/form.

2006-04-11 Thread Mike Looijmans
for us? -- Mike Looijmans Philips Natlab / Topic Automation Graham Dumpleton wrote: With FieldStorage being discussed on main user mailing list, came across this old post of the mailing list: http://www.modpython.org/pipermail/mod_python/2001-November/012256.html What it is saying

Grouping tests (was: Latest tests)

2006-03-29 Thread Mike Looijmans
a second), this saves me a lot of time when working on a part of a big project, where I don't need to run all tests all the time. -- Mike Looijmans Philips Natlab / Topic Automation Jim Gallacher wrote: ... I've been playing with some ideas for a new test framework, using a subclass

Re: mod_python 3.3.0-dev-20060321 available for testing

2006-03-22 Thread Mike Looijmans
Nicolas, could you make a Win32 binary for us poor people? -- Mike Looijmans Philips Natlab / Topic Automation

Re: [jira] Commented: (MODPYTHON-93) Improve util.FieldStorage efficiency

2006-03-20 Thread Mike Looijmans
I was checking the documentation with respect to this patch and I noticed a couple of things. The FieldStorage constructor has 2 undocumented parameters, file_callback=None, field_callback=None. These were added in r160259 as part of Barry Pearce's fix for MODPYTHON-40. In the same patch,

Re: mod_python roadmap

2006-03-14 Thread Mike Looijmans
a dictionary for fields - Allow any file-like object ('write' method) to be used in a make_file callback (all the coding is already done) Mike Looijmans Philips Natlab / Topic Automation

FieldStorage improvements as in MODPYTHON-93

2006-03-13 Thread Mike Looijmans
it integrated? (I really need the file upload to work decently, and others may like the improved performance) -- Mike Looijmans Philips Natlab / Topic Automation

Re: FieldStorage improvements as in MODPYTHON-93

2006-03-13 Thread Mike Looijmans
Mike Looijmans Philips Natlab / Topic Automation Jim Gallacher wrote: Mike Looijmans wrote: I'm currently using a 'private' patch, but I would really like to see this one incorporated in some release: http://issues.apache.org/jira/browse/MODPYTHON-93 The patch is there, all unit tests pass

Re: mod_python 3.2.8 available for testing

2006-02-22 Thread Mike Looijmans
Yup. Much better with that one: ## Ran 6 tests in 91.047s OK ## You have my +1 (even though you weren't waiting for it) And my merged util.py also passes the test suite, which is what I really wanted to know. -- Mike Looijmans Philips Natlab / Topic Automation Nicolas Lehuen wrote: Yup

Re: mod_python 3.2.8 available for testing

2006-02-21 Thread Mike Looijmans
I get failing tests on WinXP-sp2, apache 2.0.54, python 2.4.2. This may be because the test suite is looking for things not there yet. Put the 3.2.8 binary distribution on my system and did a svn update to get the latest test suite. When running the tests, I got the following failures (can we

FieldStorage callback only works with FileType objects in 3.2.7

2006-02-19 Thread Mike Looijmans
it into memory (which is what we were preventing in issue 40) A quick way to solve it is to use this code: http://issues.apache.org/jira/browse/MODPYTHON-93 this will remove the bad checks for field types alltogether. -- Mike Looijmans Philips Natlab / Topic Automation

Re: Refactoring of the test suite

2006-02-12 Thread Mike Looijmans
Oh and if we are refactoring the tests, I want a make tests rule. I'm tired of doing: ./configure; make; sudo make install; make tests; DOH! cd test; python test.py. :) Make that make check (like autotools), to not confuse old-skool autoconfers like myself.

[jira] Updated: (MODPYTHON-93) Improve util.FieldStorage efficiency

2005-12-01 Thread Mike Looijmans (JIRA)
[ http://issues.apache.org/jira/browse/MODPYTHON-93?page=all ] Mike Looijmans updated MODPYTHON-93: Attachment: modpython325_util_py_dict.patch What it does: - Simplifies the creation of StringField objects. This was already marked as a TODO

Re: [jira] Commented: (MODPYTHON-93) Improve util.FieldStorage efficiency

2005-11-29 Thread Mike Looijmans
. -- Mike Looijmans Philips Natlab / Topic Automation

Re: Various musings about the request URL / URI / whatever

2005-11-29 Thread Mike Looijmans
a 400 response, because you MUST supply it (says RFC 2068, and whatever superseded that one). There is more you must do to be able to call yourself HTTP/1.1 by the way, such as keep-alive connections and chunked encoding. -- Mike Looijmans Philips Natlab / Topic Automation

Re: [jira] Commented: (MODPYTHON-93) Improve util.FieldStorage efficiency

2005-11-28 Thread Mike Looijmans
expectations. How about we make the first call to get or __getitem__ create the dictionary? We could put code in __getattr__ to create it when it's referenced. Patch is on its way... -- Mike Looijmans Philips Natlab / Topic Automation

Re: More efficient StringField and Field classes

2005-11-25 Thread Mike Looijmans
) -- Traceback (most recent call last): File test.py, line 1117, in test_util_fieldstorage self.fail(`rsp`) File /usr/lib/python2.3/unittest.py, line 270, in fail raise self.failureException, msg AssertionError: ['1', '2', '3', '4'] Jim -- Mike Looijmans Philips Natlab / Topic Automation

Re: More efficient StringField and Field classes

2005-11-24 Thread Mike Looijmans
don't think it's needed. It works: - Perfect on all of my projects. Attached: - Patch created by SVN -- Mike Looijmans Philips Natlab / Topic Automation Index: util.py === --- util.py (revision 348746) +++ util.py (working copy

Re: Developer Guidelines (was Re: More efficient FieldStorage, StringField and Field classes)

2005-11-15 Thread Mike Looijmans
), but I do most development on this Windows system, so I need a windows executable anyway. PS: Haven't found any speling errors in your document... Jim Gallacher wrote: Mike Looijmans wrote: Inspired by our FieldStorage work with file uploads, I also made some implementation changes to Field

Re: Developer Guidelines (was Re: More efficient FieldStorage, StringField and Field classes)

2005-11-15 Thread Mike Looijmans
- since i won't be hackin' the C code (yet), would it be sufficient to just install the binary, and use the .py files as obtained from the SVN repository? The 3.2.5 beta seems to run just fine here. Cannot run the automated tests though, because of the issues mentioned above. -- Mike Looijmans

Re: mod_python.util.StorageField.read_to_boundary has problems in 3.1 and 3.2

2005-11-08 Thread Mike Looijmans
) and the 'mike' version. In addition, I added some profiling calls to show the impact of the extra 'endswith' and slices. -- Mike Looijmans Philips Natlab / Topic Automation #!/usr/bin/env python import sys from cStringIO import StringIO import md5 ##def generate_split_file(offset=-1

Re: mod_python.util.StorageField.read_to_boundary has problems in 3.1 and 3.2

2005-11-07 Thread Mike Looijmans
' else: file.write(previous_delimiter + line) previous_delimiter = '' This new functions passes the test for Jim's filetest generator. -- Mike Looijmans Philips Natlab / Topic Automation