Re: [Django] #13600: OverflowError not caught in django.views.static.serve

2010-09-11 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by SmileyChris):

  * has_patch:  0 => 1
  * stage:  Unreviewed => Ready for checkin

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-08-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by adamnelson):

 I've updated the gist with the reproducible version.  The easiest way to
 replicate this is to use http://modifyheaders.mozdev.org/ and modify:

 If-Modified-Since to Mon, 29 Jul 3121 29:24:25 GMT

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-08-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by adamnelson):

 Oops, thought you just wanted the stack trace in text.  These are from a
 live site so these are from djangodberrorlog.  I'll try to replicate
 myself.

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-08-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by adamnelson):

 Here is the text version:

 {{{
 Traceback (most recent call last):

   File "/var/www/yipit-env/lib/python2.6/site-
 packages/django/core/handlers/base.py", line 100, in get_response
 response = callback(request, *callback_args, **callback_kwargs)

   File "/var/www/yipit-env/lib/python2.6/site-
 packages/staticfiles/views.py", line 32, in serve
 show_indexes=show_indexes)

   File "/var/www/yipit-env/lib/python2.6/site-
 packages/django/views/static.py", line 61, in serve
 statobj[stat.ST_MTIME], statobj[stat.ST_SIZE]):

   File "/var/www/yipit-env/lib/python2.6/site-
 packages/django/views/static.py", line 129, in was_modified_since
 header_mtime = mktime_tz(parsedate_tz(matches.group(1)))

   File "/usr/lib/python2.6/email/_parseaddr.py", line 146, in mktime_tz
 t = time.mktime(data[:8] + (0,))

 OverflowError: mktime argument out of range
 }}}

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-08-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by ramiro):

 Replying to [comment:3 adamnelson]:
 > I can reproduce it, and I've just seen it on live.  Here is the relevant
 part of the stack trace.
 >
 > http://gist.github.com/545597

 Can you reproduce the error condition at will?. If so, could you paste the
 text version of the stack trace?. There is a button for that in the
 exception page generated by Django when running with DEBUG=True.

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-08-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by adamnelson):

 BTW, this is on Ubuntu 10.04 with Python 2.6.5

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-08-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by adamnelson):

  * status:  closed => reopened
  * resolution:  worksforme =>
  * version:  1.1 => 1.2
  * component:  Uncategorized => HTTP handling

Comment:

 I can reproduce it, and I've just seen it on live.  Here is the relevant
 part of the stack trace.

 http://gist.github.com/545597

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-06-16 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.1   
Resolution:  worksforme |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * status:  new => closed
  * resolution:  => worksforme

Comment:

 I can't reproduce the problem you describe -- using Python 2.6, the date
 "Mon 28 May 3121 28:25:26" actually parses correctly as "Tue, 29 May 3121
 04:25:26"; using Python 2.5, it raises a ValueError. (Both of these tests
 were running under Mac OSX).

 Closing worksforme; If you can provide more specific reproduction
 instructions, please reopen.

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-05-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.1   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by Alex):

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

Old description:

> I noticed that sometimes I get an "OverflowError: mktime argument out of
> range" error in django.views.static.serve, when a request is made with a
> strange date, say, request.META contents something like
> {'HTTP_IF_MODIFIED_SINCE': 'Mon, 28 May 3121 28:25:26 GMT'}.
>
> Python docs say on this that the exceptions raised in mktime are either
> ValueError (if caught in Python layer) or OverflowError (if caught in C
> layer).
>
> I suppose it could be fixed with replacing the third endmost line in
> django.views.static.was_modified_since from actual
>
> except (AttributeError, ValueError):
>
> to
>
> except (AttributeError, ValueError, OverflowError):
>
> Probably, there has been some reason not to catch OverflowErrors, then
> sorry.

New description:

 I noticed that sometimes I get an "OverflowError: mktime argument out of
 range" error in django.views.static.serve, when a request is made with a
 strange date, say, request.META contents something like
 {'HTTP_IF_MODIFIED_SINCE': 'Mon, 28 May 3121 28:25:26 GMT'}.

 Python docs say on this that the exceptions raised in mktime are either
 ValueError (if caught in Python layer) or OverflowError (if caught in C
 layer).

 I suppose it could be fixed with replacing the third endmost line in
 django.views.static.was_modified_since from actual
 {{{
 except (AttributeError, ValueError):
 }}}
 to
 {{{
 except (AttributeError, ValueError, OverflowError):
 }}}
 Probably, there has been some reason not to catch OverflowErrors, then
 sorry.

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-05-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
---+
 Reporter:  KostikVento|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.1   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 I noticed that sometimes I get an "OverflowError: mktime argument out of
 range" error in django.views.static.serve, when a request is made with a
 strange date, say, request.META contents something like
 {'HTTP_IF_MODIFIED_SINCE': 'Mon, 28 May 3121 28:25:26 GMT'}.

 Python docs say on this that the exceptions raised in mktime are either
 ValueError (if caught in Python layer) or OverflowError (if caught in C
 layer).

 I suppose it could be fixed with replacing the third endmost line in
 django.views.static.was_modified_since from actual

 except (AttributeError, ValueError):

 to

 except (AttributeError, ValueError, OverflowError):

 Probably, there has been some reason not to catch OverflowErrors, then
 sorry.

-- 
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.