mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 16:36:20 +00:00
uri: generalize regexp that recognizes tahoe URLs to work for any host and port
This commit is contained in:
parent
2b2c2a566b
commit
8e48a0eeef
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user