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

Single html file has application/x-www-form-urlencoded content-type #219

Closed
agazso opened this issue Jul 26, 2021 · 2 comments
Closed

Single html file has application/x-www-form-urlencoded content-type #219

agazso opened this issue Jul 26, 2021 · 2 comments
Labels

Comments

@agazso
Copy link
Member

agazso commented Jul 26, 2021

If I upload a single html file (as in a single page website) and then I try to access it the browser will try to download it, because the content-type is application/x-www-form-urlencoded.

It would be good if the content-type were text/html or at least the content type could be manually provided.

For example:

% swarm-cli upload index.html 

Swarm hash: 90bcfbc87ef057d3dccadd91bc8939781cb732fa0468f73f41cb7747b057e197
URL: http://localhost:1633/bzz/90bcfbc87ef057d3dccadd91bc8939781cb732fa0468f73f41cb7747b057e197/
% curl -v http://localhost:1633/bzz/90bcfbc87ef057d3dccadd91bc8939781cb732fa0468f73f41cb7747b057e197/
...DETAILS OMITTED...
< content-type: application/x-www-form-urlencoded
...DETAILS OMITTED...
@bee-runner bee-runner bot added the issue label Jul 26, 2021
@Cafe137
Copy link
Collaborator

Cafe137 commented Jul 26, 2021

Will be possibly fixed by ethersphere/bee-js#375

@AuHau
Copy link
Contributor

AuHau commented Aug 18, 2021

This was coming from axios that was setting application/x-www-form-urlencoded automatically. This will change in the ky refactor.

@Cafe137 Cafe137 closed this as completed Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants