1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/Webware/WebKit/Application.py-0.8.1.diff Sun Feb 01 18:46:33 2004 +0000
1.3 @@ -0,0 +1,51 @@
1.4 +--- Application.py Wed Jan 22 10:03:25 2003
1.5 ++++ Application.py Sun Feb 1 18:03:03 2004
1.6 +@@ -389,7 +389,10 @@
1.7 + try:
1.8 + ssPath = request.serverSidePath()
1.9 + if ssPath is None or not os.path.exists(ssPath):
1.10 +- self.handleBadURL(transaction)
1.11 ++ try:
1.12 ++ self.handleGoodURL(transaction)
1.13 ++ except Exception, exc:
1.14 ++ self.handleBadURL(transaction)
1.15 + elif isdir(ssPath) and noslash(request.pathInfo()): # (*) see below
1.16 + self.handleDeficientDirectoryURL(transaction)
1.17 + elif self.isSessionIdProblematic(request):
1.18 +@@ -1030,7 +1033,7 @@
1.19 + cache = self._servletCacheByPath.get(path, None)
1.20 +
1.21 + # File is not newer?
1.22 +- if cache and cache['timestamp']<os.path.getmtime(path):
1.23 ++ if cache and cache.has_key('timestamp') and cache['timestamp']<os.path.getmtime(path):
1.24 + cache['instances'][:] = []
1.25 + cache = None
1.26 +
1.27 +@@ -1038,11 +1041,15 @@
1.28 + cache = {
1.29 + 'instances': [],
1.30 + 'path': path,
1.31 +- 'timestamp': os.path.getmtime(path),
1.32 + 'threadsafe': 0,
1.33 + 'reuseable': 0,
1.34 + }
1.35 +
1.36 ++ try:
1.37 ++ cache['timestamp'] = os.path.getmtime(path)
1.38 ++ except OSError:
1.39 ++ pass
1.40 ++
1.41 + self.newServletCacheItem(path,cache)
1.42 + inst = self.getServlet(transaction,path,cache)
1.43 +
1.44 +@@ -1284,8 +1291,8 @@
1.45 + else:
1.46 + return None, None, None
1.47 +
1.48 +- elif not os.path.isfile(ssPath):
1.49 +- return None, None, None
1.50 ++ #elif not os.path.isfile(ssPath):
1.51 ++ # return None, None, None
1.52 +
1.53 + self._serverSideInfoCacheByPath[urlPath] = ssPath, contextPath, contextName
1.54 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/Webware/WebKit/HTTPRequest.py-0.8.1.diff Sun Feb 01 18:46:33 2004 +0000
2.3 @@ -0,0 +1,65 @@
2.4 +--- HTTPRequest.py Thu Jul 31 23:08:06 2003
2.5 ++++ HTTPRequest.py Sun Feb 1 18:03:56 2004
2.6 +@@ -240,6 +240,53 @@
2.7 + # @@ 2000-03-26 ce: maybe belongs in section below. clean up docs
2.8 + return self._environ['REMOTE_USER']
2.9 +
2.10 ++ ## Languages ##
2.11 ++
2.12 ++ def _contentPreferences(self, accept_preference):
2.13 ++ """
2.14 ++ Returns the preferences as requested by the user agent. The preferences are
2.15 ++ returned as a list of codes in the same order as they appeared in the
2.16 ++ appropriate environment variable. In other words, the explicit weighting
2.17 ++ criteria are ignored.
2.18 ++
2.19 ++ As the 'accept_preference' parameter, values for language and charset
2.20 ++ preferences are appropriate.
2.21 ++ """
2.22 ++
2.23 ++ accept_defs = accept_preference.split(",")
2.24 ++ accept_prefs = []
2.25 ++ for accept_def in accept_defs:
2.26 ++ t = accept_def.split(";")
2.27 ++ if len(t) >= 1:
2.28 ++ accept_prefs.append(t[0].strip())
2.29 ++ return accept_prefs
2.30 ++
2.31 ++ def contentLanguages(self):
2.32 ++ """
2.33 ++ Returns the language preferences.
2.34 ++ """
2.35 ++
2.36 ++ try:
2.37 ++ return self._contentPreferences(self._environ["HTTP_ACCEPT_LANGUAGE"])
2.38 ++ except KeyError:
2.39 ++ return []
2.40 ++
2.41 ++ def contentCharsets(self):
2.42 ++ """
2.43 ++ Returns the character set preferences.
2.44 ++ """
2.45 ++
2.46 ++ try:
2.47 ++ return self._contentPreferences(self._environ["HTTP_ACCEPT_CHARSET"])
2.48 ++ except KeyError:
2.49 ++ return []
2.50 ++
2.51 ++ def contentType(self):
2.52 ++ """
2.53 ++ Returns the content type of the request.
2.54 ++ """
2.55 ++
2.56 ++ return self._environ.get('CONTENT_TYPE', None)
2.57 +
2.58 + ## Remote info ##
2.59 +
2.60 +@@ -503,7 +550,7 @@
2.61 + you want to be sure you get the entire body of the request.
2.62 + """
2.63 + fs = self.fieldStorage()
2.64 +- if rewind:
2.65 ++ if fs is not None and fs.file is not None and rewind:
2.66 + fs.file.seek(0)
2.67 + return fs.file
2.68 +