Skip to content

Commit

Permalink
Merge pull request #45 from andrius-k/index128
Browse files Browse the repository at this point in the history
A workaround for a (breaking) change in Google URL Shortening API
  • Loading branch information
rovere authored Jan 22, 2019
2 parents d644407 + 1c48894 commit 04d076d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/python/Core/Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,20 @@ def __init__(self):
def load(self):
req = request

# Due to a recent (observed on 2019-01-22) change in Google url shortening
# API, the returned full url is url encoded when it shoudn't be.
# This is a workaround for this issue.
# More info: https://its.cern.ch/jira/browse/PDMVRELVALS-5
params = {}
for k in req.params.keys():
if '=' in k:
parts = k.split('=', 1)
params[parts[0]] = parts[1]
else:
params[k] = req.params[k]

req.params = params

## Retrieve all parameters associated to the request and change
## unicode strings back to str, so that all the C++ code that uses
## them is happy.
Expand Down

0 comments on commit 04d076d

Please sign in to comment.