Skip to content

Don't URL encode path components#2505

Merged
Gabriella439 merged 2 commits intomainfrom
gabriella/fix_url_encoding
Apr 9, 2023
Merged

Don't URL encode path components#2505
Gabriella439 merged 2 commits intomainfrom
gabriella/fix_url_encoding

Conversation

@Gabriella439
Copy link
Collaborator

Fixes #2467

After dhall-lang/dhall-lang#581 the standard requires implementations to not do anything special with respect to URL encoding. In other words, a conforming implementation:

  • Should not URL-encode path components when parsing imports from Dhall source code

  • Should not URL-encode path components when resolving those same imports

The user can still specify an import that uses URL encoded path components, but the implementation does not give them any special treatment. It just blindly forwards those path components undisturbed.

Before this change, the Haskell implementation of Dhall was correctly handling the first part (not url encoding path components at parse time) but was still incorrectly handling the second part (because it would URL encode path components at import resolution time). This change fixes that.

Fixes #2467

After dhall-lang/dhall-lang#581 the standard
requires implementations to not do anything special with respect to
URL encoding.  In other words, a conforming implementation:

- Should not URL-encode path components when parsing imports from Dhall
  source code

- Should not URL-encode path components when resolving those same
  imports

The user can still specify an import that uses URL encoded path
components, but the implementation does not give them any special
treatment.  It just blindly forwards those path components undisturbed.

Before this change, the Haskell implementation of Dhall was correctly
handling the first part (not url encoding path components at parse
time) but was still incorrectly handling the second part (because it
would URL encode path components at import resolution time).  This
change fixes that.
@Gabriella439 Gabriella439 enabled auto-merge (squash) April 9, 2023 14:51
@Gabriella439 Gabriella439 merged commit 595d05b into main Apr 9, 2023
@Gabriella439 Gabriella439 deleted the gabriella/fix_url_encoding branch April 9, 2023 15:35
locallycompact pushed a commit to locallycompact/dhall-haskell that referenced this pull request Apr 26, 2023
Fixes dhall-lang#2467

After dhall-lang/dhall-lang#581 the standard
requires implementations to not do anything special with respect to
URL encoding.  In other words, a conforming implementation:

- Should not URL-encode path components when parsing imports from Dhall
  source code

- Should not URL-encode path components when resolving those same
  imports

The user can still specify an import that uses URL encoded path
components, but the implementation does not give them any special
treatment.  It just blindly forwards those path components undisturbed.

Before this change, the Haskell implementation of Dhall was correctly
handling the first part (not url encoding path components at parse
time) but was still incorrectly handling the second part (because it
would URL encode path components at import resolution time).  This
change fixes that.
locallycompact pushed a commit to locallycompact/dhall-haskell that referenced this pull request Apr 26, 2023
Fixes dhall-lang#2467

After dhall-lang/dhall-lang#581 the standard
requires implementations to not do anything special with respect to
URL encoding.  In other words, a conforming implementation:

- Should not URL-encode path components when parsing imports from Dhall
  source code

- Should not URL-encode path components when resolving those same
  imports

The user can still specify an import that uses URL encoded path
components, but the implementation does not give them any special
treatment.  It just blindly forwards those path components undisturbed.

Before this change, the Haskell implementation of Dhall was correctly
handling the first part (not url encoding path components at parse
time) but was still incorrectly handling the second part (because it
would URL encode path components at import resolution time).  This
change fixes that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with space character in URL import.

1 participant