equal
deleted
inserted
replaced
138 if (self.host and ':' in self.host and |
138 if (self.host and ':' in self.host and |
139 not (self.host.startswith('[') and self.host.endswith(']'))): |
139 not (self.host.startswith('[') and self.host.endswith(']'))): |
140 self.host, self.port = self.host.rsplit(':', 1) |
140 self.host, self.port = self.host.rsplit(':', 1) |
141 if not self.host: |
141 if not self.host: |
142 self.host = None |
142 self.host = None |
|
143 |
|
144 if (self.host and self.scheme == 'file' and |
|
145 self.host not in ('localhost', '127.0.0.1', '[::1]')): |
|
146 raise util.Abort(_('file:// URLs can only refer to localhost')) |
|
147 |
143 self.path = path |
148 self.path = path |
144 |
149 |
145 for a in ('user', 'passwd', 'host', 'port', |
150 for a in ('user', 'passwd', 'host', 'port', |
146 'path', 'query', 'fragment'): |
151 'path', 'query', 'fragment'): |
147 v = getattr(self, a) |
152 v = getattr(self, a) |