projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b2c2a5
)
uri: generalize regexp that recognizes tahoe URLs to work for any host and port
author
Zooko O'Whielacronx
<zooko@zooko.com>
Wed, 17 Dec 2008 00:49:30 +0000
(17:49 -0700)
committer
Zooko O'Whielacronx
<zooko@zooko.com>
Wed, 17 Dec 2008 00:49:30 +0000
(17:49 -0700)
src/allmydata/uri.py
patch
|
blob
|
history
diff --git
a/src/allmydata/uri.py
b/src/allmydata/uri.py
index 8994cce7c873aec6894022d8751d97e8991469dd..6b0e0666f82f7ea0f4aab52b57031d236d452a9b 100644
(file)
--- a/
src/allmydata/uri.py
+++ b/
src/allmydata/uri.py
@@
-16,10
+16,11
@@
BASE32STR_256bits = '(%s{51}%s)' % (base32.BASE32CHAR, base32.BASE32CHAR_1bits)
SEP='(?::|%3A)'
NUMBER='([0-9]+)'
+NUMBER_IGNORE='(?:[0-9]+)'
# URIs (soon to be renamed "caps") are always allowed to come with a leading
# 'http://127.0.0.1:(8123|3456)/uri/' that will be ignored.
-OPTIONALHTTPLEAD=r'(?:https?://(?:
127.0.0.1|localhost):(?:8123|3456)/uri/)?'
+OPTIONALHTTPLEAD=r'(?:https?://(?:
[^:/]+)(?::%s)?/uri/)?' % NUMBER_IGNORE
class _BaseURI: