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

Invalid json, trailing null chars added #11

Open
utix opened this issue Sep 7, 2020 · 8 comments
Open

Invalid json, trailing null chars added #11

utix opened this issue Sep 7, 2020 · 8 comments

Comments

@utix
Copy link

utix commented Sep 7, 2020

Looks like the answered response is corrupted

The raw data downloaded from https://hoppscotch.io/ has two null character at this end.
image

I have checked with wireshark, there is no issue the data is correct and there is not trailing null chars
image

I suspect to plugin to have added it, how can I check it ?

@exussum12
Copy link

It has added it, there is a setting which removes the extension and the trailing null is removed

@liyasthomas
Copy link
Member

This is a known issue while using browser extension. We're working on a fix. Kindly stay tuned.
Temporarily, you can try turning off extension from Settings > Extensions.

@exussum12
Copy link

While a better fix is being worked on is it worth just adding .replace(/\0$/, '') to remove the null byte ?

@liyasthomas
Copy link
Member

@AndrewBastin

@AndrewBastin
Copy link
Member

Well, I did a patch in Hoppscotch for just removing the null byte, but i will get around fixing that soon.

Keeping this issue open until then.

@timogriese
Copy link

The same issue is also true for image/svg+xml.
The issue is pretty old, is there any progress, or is the extension abandoned?

@AndrewBastin
Copy link
Member

@timogriese The extension is not abandoned and is still actively supported, there wasn't much work on it is why there aren't any updates.

We had a patch long back on hoppscotch app itself to trim the trailing null.

If you are able to reproduce, can I get like an endpoint or something I can test on ?

@timogriese
Copy link

timogriese commented May 19, 2023

@AndrewBastin Thank you for your quick feedback. Here is an endpoint for debugging the issue. https://bygdrvuqslgkfdiatvkf.functions.supabase.co/hoppscotch-debug/generate/pattern
I made it listen on GET, so you can easily test it with your browser.
Edge yields this message when I used Hoppscotch + the browser-extension to download the svg.
image
Everything works well if I directly GET the endpoint without the browser-extension (using Proxy) or the browser.
image
To make the issue more clear, here is a screenshot of the trailing null values in the SVG:
image

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

No branches or pull requests

5 participants