cal-itp/gtfs-aggregator-checker

More permissive matching of URLs

Closed this issue · 0 comments

In testing this out, I noticed that some URLs were not being matched since they were not exact matches, although they were functionally the same. feed-checker should be able to match URLs when the following situations occur:

  1. feed-checker should match http or https. Ex: https://www.bart.gov/dev/schedules/google_transit.zip should match http://www.bart.gov/dev/schedules/google_transit.zip.
  2. feed-checker should be agnostic to the order of the URL query parameters. Ex: http://example.com/feed?a=1&b=2 should match http://example.com/feed?b=2&a=1
  3. feed-checker should omit API keys when checking URL query parameters. Ex: http://api.511.org/transit/datafeeds?api_key={{ MTC_511_API_KEY}}&operator_id=AM should match http://api.511.org/transit/datafeeds?operator_id=AM. The sensitive query parameters should be removed in both the input feed URL and the aggregated feed URL when doing a comparison. By default the query params token and api_key should be omitted.