Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: url-safe filename #162

Merged
merged 1 commit into from
Jun 21, 2023
Merged

fix: url-safe filename #162

merged 1 commit into from
Jun 21, 2023

Conversation

tuanalumi
Copy link
Contributor

Description

fix: URL-encode filename before setting it to response headers.

Problem

HTTP spec suggests that HTTP header should include ASCII character only. If filename contains non-ASCII char, hasura-storage will respond with non-ASCII char in header. This will break the response in some cases (Azure App Service in my case).

Solution

URL-encode the filename (with net/url) before setting it to header.

@dbarrosop dbarrosop merged commit 78447dd into nhost:main Jun 21, 2023
@dbarrosop
Copy link
Member

thanks a lot for the PR!

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.

2 participants