improvement of url encoding technique (implemented failsafe routine for shortening too long GET queries)

This commit is contained in:
Miroslav Stampar
2011-03-09 09:36:56 +00:00
parent 9b2962ff1c
commit 5c97f9a496
3 changed files with 28 additions and 3 deletions

View File

@@ -271,3 +271,9 @@ REFLECTED_VALUE_MARKER = '__REFLECTED_VALUE__'
# Regular expression used for marking non-alphanum characters
REFLECTED_NON_ALPHA_NUM_REGEX = r'[^<>\\r\\n]+?'
# chars which can be used as a failsafe values in case of too long URL encoding value
URLENCODE_FAILSAFE_CHARS = '()|,'
# maximum length of urlencoded value after which failsafe procedure takes away
URLENCODE_CHAR_LIMIT = 4000