Commit 74dbdb94 authored by Jim Fulton's avatar Jim Fulton

Changed regular expressions for absolute URI in Redirect exception

handling to allow the protocol to be ommitted.
parent 54fedc41
'''CGI Response Output formatter '''CGI Response Output formatter
$Id: Response.py,v 1.38 1998/09/09 18:03:14 jim Exp $''' $Id: Response.py,v 1.39 1998/09/23 22:04:20 jim Exp $'''
# #
# Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA. # Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA.
# All rights reserved. # All rights reserved.
...@@ -51,7 +51,7 @@ $Id: Response.py,v 1.38 1998/09/09 18:03:14 jim Exp $''' ...@@ -51,7 +51,7 @@ $Id: Response.py,v 1.38 1998/09/09 18:03:14 jim Exp $'''
# #
# (540) 371-6909 # (540) 371-6909
# #
__version__='$Revision: 1.38 $'[11:-2] __version__='$Revision: 1.39 $'[11:-2]
import string, types, sys, regex import string, types, sys, regex
from string import find, rfind, lower, upper, strip, split, join, translate from string import find, rfind, lower, upper, strip, split, join, translate
...@@ -430,7 +430,11 @@ class Response: ...@@ -430,7 +430,11 @@ class Response:
def exception(self, fatal=0, info=None, def exception(self, fatal=0, info=None,
absuri_match=regex.compile( absuri_match=regex.compile(
"[a-zA-Z0-9+.-]+:[^\0- \"\#<>]+\(#[^\0- \"\#<>]*\)?" "^"
"\(/\|\([a-zA-Z0-9+.-]+:\)\)"
"[^\000- \"\\#<>]*"
"\\(#[^\000- \"\\#<>]*\\)?"
"$"
).match, ).match,
tag_search=regex.compile('[a-zA-Z]>').search, tag_search=regex.compile('[a-zA-Z]>').search,
): ):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment