Skip to content

Bug: Invalid URL encoding - using "+" instead of "%20" for spaces #104

@emmanuelmathot

Description

@emmanuelmathot

Problem Description

Preview thumbnails fail to load in recent versions of STAC Browser while working correctly in older versions. The root cause is that URLs in our STAC catalogs use + to encode spaces, which is invalid according to RFC 3986.

Details

Symptoms

  • Preview thumbnails fail in new STAC Browser versions
  • URLs are encoded differently between browser versions

Root Cause

The href fields in our STAC catalogs use + to encode spaces in URLs, but according to RFC 3986, this is invalid:

For example, "%20" is the percent-encoding for the binary octet "00100000" (ABNF: %x20), which in US-ASCII corresponds to the space character (SP).

While + is a reserved character (sub-delim), it should not be used to represent spaces in URLs. The correct encoding is %20.

Related Issue

This behavior changed in STAC Browser:

Required Action

Update all code that generates STAC catalog URLs to use %20 instead of + for space encoding.

Areas to Check

  1. STAC item/collection generation scripts
  2. Asset href generation
  3. Any URL construction or manipulation code
  4. Existing STAC JSON files in the repository

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions