Skip to content

Commit e16da3d

Browse files
konsultenclabbenius
authored andcommitted
downloadLocation URIs not case sensitive
Signed-off-by: Claes Nordmark <[email protected]>
1 parent a25937f commit e16da3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/spdx_tools/spdx/validation/uri_validators.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
download_location_pattern = (
1919
"^(((" + supported_download_repos + "\\+)?" + url_pattern + ")|" + git_pattern + "|" + bazaar_pattern + ")$"
2020
)
21+
compiled_pattern = re.compile(download_location_pattern, re.IGNORECASE)
2122

2223

2324
def validate_url(url: str) -> List[str]:
@@ -28,7 +29,7 @@ def validate_url(url: str) -> List[str]:
2829

2930

3031
def validate_download_location(location: str) -> List[str]:
31-
if not (validate_url(location) == [] or re.match(download_location_pattern, location)):
32+
if not (validate_url(location) == [] or compiled_pattern.match(location)):
3233
return [f"must be a valid URL or download location according to the specification, but is: {location}"]
3334

3435
return []

0 commit comments

Comments
 (0)