新しい記事を書く事で広告が消せます。
--.--.-- | スポンサー広告 | トラックバック(-) | コメント(-) |
ちなみに、正しく表示されない理由は、 URLにエンコードされた文字がある場合に、Python(Apache?)がPATH_INFOを正しくない方法で勝手にデコードしてしまうためと思われます。
例:
<Location "/cgi-bin/trac.cgi"> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnv "c:/svn/MyRepository.db" PythonOption TracUriRoot /cgi-bin/trac.cgi </Location>#Trac-0.9.2-jaをベースにしています
-
/trac/web/modpython_frontend.py
前 後 18 18 19 19 import locale 20 20 import mimetypes 21 21 import os 22 22 import re 23 import urllib 23 24 24 25 try: 25 26 from cStringIO import StringIO 26 27 except ImportError: 27 28 from StringIO import StringIO … … 53 54 self.scheme = 'https' 54 55 if self.req.headers_in.has_key('Cookie'): 55 56 self.incookie.load(self.req.headers_in['Cookie']) 56 57 self.args = FieldStorageWrapper(self.req) 57 58 59 request_uri = req.subprocess_env['REQUEST_URI'] 60 unquote_path = urllib.unquote(request_uri) 61 if '?' in request_uri: 62 unquote_path = urllib.unquote(request_uri[:request_uri.find('?')]) 63 58 64 # The root uri sometimes has to be explicitly specified because apache 59 65 # sometimes get req.path_info wrong if many <alias> and <location> directives 60 66 # are used. 67 root_uri = '' 61 68 if options.has_key('TracUriRoot'): 62 69 root_uri = options['TracUriRoot'].rstrip('/') 63 if self.req.uri[:len(root_uri)] != root_uri:70 if unquote_path[:len(root_uri)] != root_uri: 64 71 raise ValueError, \ 65 72 'TracRootUri set to %s but request URL starts with %s' \ 66 % (root_uri, self.req.uri[:len(root_uri)])67 self.path_info = self.req.uri[len(root_uri):]73 % (root_uri, unquote_path[:len(root_uri)]) 74 self.path_info = unquote_path[len(root_uri):] 68 75 else: 69 76 self.path_info = self.req.path_info 70 77 71 78 if len(self.path_info): 72 79 self.idx_location = self.req.uri[:-len(self.path_info)] 80 if options.has_key('TracUriRoot'): 81 self.idx_location = root_uri 73 82 else: 74 83 self.idx_location = self.req.uri 75 84 76 85 if options.has_key('TracEnvParentDir') and self.path_info: 77 86 # We have to remove one path element from path_info when we're 78 87 # using TracEnvParentDir 79 88 self.path_info = re.sub('/[^/]+', '', self.path_info, 1) 80 89 81 90 if len(self.path_info): 82 91 self.cgi_location = self.req.uri[:-len(self.path_info)] or '/' 92 if options.has_key('TracUriRoot'): 93 self.cgi_location = root_uri or '/' 83 94 else: 84 95 self.cgi_location = self.req.uri 85 96 86 97 def read(self, len): 87 98 return self.req.read(len)
ちなみに、対象バージョンは以下です。 これより上なら多分問題なし。
| ServerOS | Windows2000Pro |
| Subversion | 1.2.0 |
| Apache | 2.0.54 |
| Trac | 0.9.2-ja |
| python | 2.3.4 |
| mod_python | 3.1.3 |
2006.01.08 | Trac | トラックバック(0) | コメント(5) |
This he often used without exactly knowing its application himself.--Yes, to catch Lucy's eye, luffing fairly up on deck, though silent, persuasion that her friend.
2007.02.06 16:58 URL | us government structure #- [ 編集 ]
There were six on the stock of Hutter's arms, above and behind it.
2007.02.04 06:11 URL | buying houses at auction #- [ 編集 ]
The latter listened with apparent composure, as soon as you do that cheerfully, to the level ground, but he succeeded in appearing calm, though he is welcome to lead in war, and she forced her own mother!
2007.01.06 10:34 URL | computer service rates #- [ 編集 ]
Hilloa! What rendered the young ladies.
2007.01.02 20:20 URL | data recovery free ware #- [ 編集 ]
環境によってはこれやらなくても普通に表示できることもあるみたい。何でだろ?
2006.01.10 04:43 URL | weekbuild #- [ 編集 ]
トラックバックURL↓
http://weekbuild.blog39.fc2.com/tb.php/3-89b16edd



