[Twisted-web] http exception in stringToDateTime

Andrea Arcangeli andrea at cpushare.com
Tue Apr 26 10:05:48 MDT 2005


Hello everyone,

My webserver sent me this exception by email a few hours ago:

        exceptions.ValueError: Unknown datetime format 'Mon, 14 Mar 2005
02:11:29 GMT; length=10208'

2005/04/26 13:52 CEST [HTTPChannel,388,hidden] Traceback (most recent call last):
          File "/home/build/bin/i686/python-20050408/lib/python2.4/site-packages/twisted/internet/defer.py", line 216, in addCa
llback

          File "/home/build/bin/i686/python-20050408/lib/python2.4/site-packages/twisted/internet/defer.py", line 207, in addCa
llbacks   

          File "/home/build/bin/i686/python-20050408/lib/python2.4/site-packages/twisted/internet/defer.py", line 328, in _runC
allbacks  

          File "/home/build/bin/i686/python-20050408/lib/python2.4/site-packages/nevow/appserver.py", line 158, in gotPageConte
xt

        --- <exception caught here> ---
          File "/home/build/bin/i686/python-20050408/lib/python2.4/site-packages/twisted/internet/defer.py", line 117, in maybe
Deferred  

          File "/home/build/bin/i686/python-20050408/lib/python2.4/site-packages/nevow/static.py", line 293, in renderHTTP

          File "/home/build/bin/i686/python-20050408/lib/python2.4/site-packages/twisted/web/http.py", line 798, in setLastModi
fied

          File "/home/build/bin/i686/python-20050408/lib/python2.4/site-packages/twisted/web/http.py", line 293, in stringToDat
etime   

        exceptions.ValueError: Unknown datetime format 'Mon, 14 Mar 2005 02:11:29 GMT; length=10208'



It seems it has been generated by the https://www.cpushare.com/contact/ form my
in website. These are the related https logs (all IP client addess hidden for
full privacy of the user):

[26/Apr/2005:11:51:33 +0000] "GET /contact/ HTTP/1.0" 302 340 "http://www.cpushare.com/legal" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
[26/Apr/2005:11:51:34 +0000] "GET /__session_key__cdc402734e5547886f2014b7138309ad/contact/ HTTP/1.0" 302 244 "http://www.cpushare.com/legal" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
[26/Apr/2005:11:51:34 +0000] "GET /contact/ HTTP/1.0" 200 5495 "http://www.cpushare.com/legal" "Mozilla/4.0(compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
[26/Apr/2005:11:51:35 +0000] "GET /cpushare.css HTTP/1.0" 200 10208 "https://www.cpushare.com/contact/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
[26/Apr/2005:11:51:35 +0000] "GET /contact/image_verification?cdc402734e5547886f2014b7138309ad_0_182154136 HTTP/1.0" 200 7033 "https://www.cpushare.com/contact/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
[26/Apr/2005:11:52:01 +0000] "GET /contact/ HTTP/1.0" 200 5495 "http://www.cpushare.com/about" "Mozilla/4.0(compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
[26/Apr/2005:11:52:02 +0000] "GET /contact/image_verification?cdc402734e5547886f2014b7138309ad_0_128972277 HTTP/1.0" 200 6957 "https://www.cpushare.com/contact/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
[26/Apr/2005:11:52:07 +0000] "GET /contact/ HTTP/1.0" 200 5495 "http://www.cpushare.com/about" "Mozilla/4.0(compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
[26/Apr/2005:11:52:08 +0000] "GET /cpushare.css HTTP/1.0" 302 - "https://www.cpushare.com/contact/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
[26/Apr/2005:11:52:08 +0000] "GET /contact/image_verification?cdc402734e5547886f2014b7138309ad_0_185839024 HTTP/1.0" 200 7046 "https://www.cpushare.com/contact/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"
[26/Apr/2005:11:52:08 +0000] "GET /internal_server_error HTTP/1.0" 200 2099 "https://www.cpushare.com/contact/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)"

It sounds a minor bug in twisted/web not in my app. I won't have time to debug
this myself until tomorrow, it's not very urgent since this is the first time
it happened, and no other user reproduced this problem.

Thanks.



More information about the Twisted-web mailing list