We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 272983c commit e784a49Copy full SHA for e784a49
webcompat/helpers.py
@@ -249,9 +249,9 @@ def parse_link_header(link_header):
249
uri_info, rel_info = link.split(';')
250
uri_info = uri_info.strip()
251
rel_info = rel_info.strip()
252
- rel = rel_info.split('=')
253
- rel_value = rel[1][1:-1]
+ rel_keyword, value = rel_info.split('=')
254
# rel values have the form `rel="foo"`, we want `foo`.
+ rel_value = value[1:-1]
255
# uri have the form `<http://…>`, we want `http://…`.
256
uri = uri_info[1:-1]
257
header_link_data.append({'link': uri, 'rel': rel_value})
0 commit comments