I've just installed Webware for the first time and would like to report
what seems to be a bug in WebUtils/Cookie.py, when using WebKit.
It appears the particular contents of my cookie causes an exception.
Operating system: Redhat 6.2
Python: 2.1
Webware 0.5.1rc3
Apache 1.3.20
AsyncThreadedAppServer
CGI Adapter (WebKit.cgi)
This all works when the client is the Redhat machine, but when
the client is WinNT 4.0 SP5 (both run Netscape 4.72), WebUtils/Cookie.py
hits an exception when parsing the Cookie:
BEGIN REQUEST
Wed Oct 10 13:31:03 2001
receiving request from <socket object, fd=9, family=2, type=1,
protocol=0>
received 1422 bytes
request has keys: format, time, environ, input
request uri = /tools/WebKit/WebKit.cgi
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/local/lib/python2.1/threading.py", line 378, in __bootstrap
self.run()
File "/usr/local/lib/python2.1/threading.py", line 366, in run
apply(self.__target, self.__args, self.__kwargs)
File "WebKit/AsyncThreadedAppServer.py", line 149, in threadloop
rh.handleRequest() #this is all there is to it
File "WebKit/AsyncThreadedAppServer.py", line 244, in handleRequest
transaction = self.server._app.dispatchRawRequest(dict)
File "WebKit/Application.py", line 283, in dispatchRawRequest
return
self.dispatchRequest(self.createRequestForDict(newRequestDict))
File "WebKit/Application.py", line 641, in createRequestForDict
return self._requestClass(dict=newRequestDict)
File "WebKit/HTTPRequest.py", line 31, in __init__
self._cookies.load(self._environ['HTTP_COOKIE'])
File "WebUtils/Cookie.py", line 605, in load
self.__ParseString(rawdata)
File "WebUtils/Cookie.py", line 625, in __ParseString
if K[0] == "$":
IndexError: string index out of range
--------------------------------------------------------
I put some diagnostics in WebUtils/Cookie.py and it looks like it's
the two equal signs in the cookie that cause the problem. I always have
this
in my cookie under WinNT, presumably a site-specific thing.
----------------------------------------
In __ParseString
str: SITESERVER=ID=ed122bdcebc3a2e127a20eee3a71e551
----------------------------------------
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Error in __ParseString
string index out of range
K: V: ed122bdcebc3a2e127a20eee3a71e551
str: SITESERVER=ID=ed122bdcebc3a2e127a20eee3a71e551
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Regards,
Matthew
--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Matthew Cahn
% Principal Scientific Support Analyst
% Bristol-Myers Squibb Company
% Mailbox code: H23-05
% P.O. Box 4000
% Princeton, NJ 08543-4000
%
% Phone: (609) 252-3477
% Fax: (609) 252-6030
% Cell: (609) 462-3603
% Email: [EMAIL PROTECTED]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss