Skip to content

Commit

Permalink
Merge pull request rucio#4130 from bziemons/patch-0-flask_header_change
Browse files Browse the repository at this point in the history
Replace calls for removed method to get headers
  • Loading branch information
bari12 committed Nov 13, 2020
2 parents 9f7a71b + 11aacd2 commit f711667
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/rucio/web/rest/flaskapi/v1/did.py
Expand Up @@ -1015,7 +1015,7 @@ def post(self, scope_name, key):
"""
try:
scope, name = parse_scope_name(scope_name)
scope, name = parse_scope_name(scope_name, request.environ.get('vo'))
except ValueError as error:
return generate_http_error_flask(400, 'ValueError', error.args[0])
except Exception as error:
Expand Down
4 changes: 2 additions & 2 deletions lib/rucio/web/rest/flaskapi/v1/redirect.py
Expand Up @@ -71,7 +71,7 @@ def get(self, scope_name):
headers.set('Access-Control-Allow-Credentials', 'true')

try:
scope, name = parse_scope_name(scope_name, request_header_ensure_string('X-Rucio-VO', 'def'))
scope, name = parse_scope_name(scope_name, request.headers.get('X-Rucio-VO', default='def'))
except ValueError as error:
return generate_http_error_flask(400, 'ValueError', error.args[0], headers=headers)
except Exception as error:
Expand Down Expand Up @@ -199,7 +199,7 @@ def get(self, scope_name):
headers.set('Access-Control-Allow-Credentials', 'true')

try:
scope, name = parse_scope_name(scope_name, request_header_ensure_string('X-Rucio-VO', 'def'))
scope, name = parse_scope_name(scope_name, request.headers.get('X-Rucio-VO', default='def'))
except ValueError as error:
return generate_http_error_flask(400, 'ValueError', error.args[0], headers=headers)
except Exception as error:
Expand Down

0 comments on commit f711667

Please sign in to comment.