Re: [Django] #13756: File upload not working under Tomcat

2011-06-02 Thread Django
#13756: File upload not working under Tomcat
-+---
   Reporter:  SvenKlemm  |  Owner:  nobody
   Type:  Bug| Status:  closed
  Milestone: |  Component:  HTTP handling
Version:  1.2|   Severity:  Normal
 Resolution:  invalid|   Keywords:
   Triage Stage:  Accepted   |  Has patch:  1
Needs documentation:  0  |Needs tests:  1
Patch needs improvement:  0  |  Easy pickings:  0
-+---

Comment (by Jeff250):

 I've opened a bug with the Jython folks for their input:
 http://bugs.jython.org/issue1754

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13756: File upload not working under Tomcat

2011-06-02 Thread Django
#13756: File upload not working under Tomcat
-+---
   Reporter:  SvenKlemm  |  Owner:  nobody
   Type:  Bug| Status:  closed
  Milestone: |  Component:  HTTP handling
Version:  1.2|   Severity:  Normal
 Resolution:  invalid|   Keywords:
   Triage Stage:  Accepted   |  Has patch:  1
Needs documentation:  0  |Needs tests:  1
Patch needs improvement:  0  |  Easy pickings:  0
-+---
Changes (by aaugustin):

 * status:  new => closed
 * resolution:   => invalid
 * needs_tests:  0 => 1
 * easy:   => 0


Comment:

 I'm following up on Jeff250's comment.

 PEP  says that `wsgi.input` is:
 > An input stream (file-like object) from which the HTTP request body
 bytes can be read. (The server or gateway may perform reads on-demand as
 requested by the application, or it may pre- read the client's request
 body and buffer it in-memory or on disk, or use any other technique for
 providing such an input stream, according to its preference.)

 It adds that:
 > The semantics of each method are as documented in the Python Library
 Reference

 

 In the Python Library Reference, the semantic of [file-like object].read()
 is:
 > Read at most size bytes from the file (less if the read hits EOF before
 obtaining size bytes).

 

 This means that:
 - WSGI does require a `wsgi.input` file object that blocks on reads until
 a buffer of ''exactly'' the requested length is returned, or EOF /
 Content-Length is reached,
 - the bug is in `modjy`, which does not provide an appropriate file-like
 object right now.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13756: File upload not working under Tomcat

2011-01-25 Thread Django
#13756: File upload not working under Tomcat
+---
  Reporter:  SvenKlemm  | Owner:  nobody
Status:  new| Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by Jeff250):

 * cc: jeff...@gmail.com (added)

Comment:

 It looks like Jython/modjy in
 
[http://jython.svn.sourceforge.net/viewvc/jython/trunk/jython/Lib/modjy/modjy_wsgi.py?revision=7022=markup
 modjy_wsgi.py] is calling
 
[http://download.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html#getInputStream%28%29
 ServletRequest.getInputStream()] and thinly wrapping it with a Python
 file-like object before passing it to Django as environ!['wsgi.input'].
 The problem is that
 
[http://download.oracle.com/javase/1.5.0/docs/api/java/io/InputStream.html#read%28byte%5B%5D%29
 InputStream.read(...)] has the semantics that, if given a `length` and if
 there are no exceptional conditions or EOF, then it will fill anywhere
 ''between'' 1 and `length` many bytes inclusive before unblocking and
 returning, whereas django is expecting it to block until ''exactly''
 `length` many bytes are returned.

 This explains why the patch works, but it's not clear to me if the bug is
 actually in Jython/modjy or in Django?  Does WSGI require you to pass in a
 'wsgi.input' file object that blocks on reads until a buffer of
 ''exactly'' the requested length is returned?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13756: File upload not working under Tomcat

2010-06-18 Thread Django
#13756: File upload not working under Tomcat
+---
  Reporter:  SvenKlemm  | Owner:  nobody
Status:  new| Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * stage:  Unreviewed => Accepted

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13756: File upload not working under Tomcat

2010-06-16 Thread Django
#13756: File upload not working under Tomcat
+---
  Reporter:  SvenKlemm  | Owner:  nobody
Status:  new| Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by txels):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I tested Sven's patch in Django 1.1.2 / Jython 2.5.1 / Tomcat 5.5. and it
 does solve the issue.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #13756: File upload not working under Tomcat

2010-06-14 Thread Django
#13756: File upload not working under Tomcat
---+
 Reporter:  SvenKlemm  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  HTTP handling  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 Currently the file upload does not work under Django because the multipart
 parser assumes reading of data happens blocking and it always gets as much
 bytes as it specifies in read() which is not true under tomcat.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.