# HG changeset patch # User paulb # Date 1075661193 0 # Node ID 8f639cc37fa6cf629178bb147dc971ce1a733912 # Parent 0d42ab204e0ad759f371feaa7ef2cb8439dc7705 [project @ 2004-02-01 18:46:33 by paulb] Added patches against WebKit 0.8.1 for various enhanced features required by WebStack. diff -r 0d42ab204e0a -r 8f639cc37fa6 patches/Webware/WebKit/Application.py-0.8.1.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/Webware/WebKit/Application.py-0.8.1.diff Sun Feb 01 18:46:33 2004 +0000 @@ -0,0 +1,51 @@ +--- Application.py Wed Jan 22 10:03:25 2003 ++++ Application.py Sun Feb 1 18:03:03 2004 +@@ -389,7 +389,10 @@ + try: + ssPath = request.serverSidePath() + if ssPath is None or not os.path.exists(ssPath): +- self.handleBadURL(transaction) ++ try: ++ self.handleGoodURL(transaction) ++ except Exception, exc: ++ self.handleBadURL(transaction) + elif isdir(ssPath) and noslash(request.pathInfo()): # (*) see below + self.handleDeficientDirectoryURL(transaction) + elif self.isSessionIdProblematic(request): +@@ -1030,7 +1033,7 @@ + cache = self._servletCacheByPath.get(path, None) + + # File is not newer? +- if cache and cache['timestamp']= 1: ++ accept_prefs.append(t[0].strip()) ++ return accept_prefs ++ ++ def contentLanguages(self): ++ """ ++ Returns the language preferences. ++ """ ++ ++ try: ++ return self._contentPreferences(self._environ["HTTP_ACCEPT_LANGUAGE"]) ++ except KeyError: ++ return [] ++ ++ def contentCharsets(self): ++ """ ++ Returns the character set preferences. ++ """ ++ ++ try: ++ return self._contentPreferences(self._environ["HTTP_ACCEPT_CHARSET"]) ++ except KeyError: ++ return [] ++ ++ def contentType(self): ++ """ ++ Returns the content type of the request. ++ """ ++ ++ return self._environ.get('CONTENT_TYPE', None) + + ## Remote info ## + +@@ -503,7 +550,7 @@ + you want to be sure you get the entire body of the request. + """ + fs = self.fieldStorage() +- if rewind: ++ if fs is not None and fs.file is not None and rewind: + fs.file.seek(0) + return fs.file +