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

[bug]: Using a file as request body in combination of a custom Content-Type freezes hoppscotch desktop app #3969

Open
1 task done
wavedeck opened this issue Apr 10, 2024 · 0 comments
Labels
bug Something isn't working need testing Needs to be tested before merging onto production

Comments

@wavedeck
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

I want to send an image file to an api that wants the mime-type of the file as the Content-Type header and the content of the file as a binary body. The only way i've been able to do this in hoppscotch was selecting "text/plain" as the Content-Type in the "Other" category and then selecting the file on the top right.

Hoppscotch's UI freezes for a while and doesn't respond to anything and recovers itself once it loaded and displays the binary content in the raw body input field. My test for a 300kb png file took about 12-15 seconds until hoppscotch recovers.

Another test using multipart/formdata and using the file select resulted in no freeze, so this only really happens in the case where you need a custom Content-Type and upload a file as a body.

Steps to reproduce

  1. Set the Content-Type to text/plain in the other category
  2. Upload a (small) image file to the raw body of the request
  3. Notice how hoppscotch freezes for a while and then displays the binary content inside the request body input field (similar how opening an image in notepad.exe or textedit.app would look like

Environment

Production

Version

Local

@wavedeck wavedeck added bug Something isn't working need testing Needs to be tested before merging onto production labels Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need testing Needs to be tested before merging onto production
Projects
None yet
Development

No branches or pull requests

1 participant