hoppscotch-extension
hoppscotch-extension copied to clipboard
Invalid json, trailing null chars added
Looks like the answered response is corrupted
The raw data downloaded from https://hoppscotch.io/ has two null character at this end.

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

I suspect to plugin to have added it, how can I check it ?
It has added it, there is a setting which removes the extension and the trailing null is removed
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.
While a better fix is being worked on is it worth just adding .replace(/\0$/, '') to remove the null byte ?
@AndrewBastin
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.
The same issue is also true for image/svg+xml. The issue is pretty old, is there any progress, or is the extension abandoned?
@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 ?
@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.
Everything works well if I directly GET the endpoint without the browser-extension (using Proxy) or the browser.
To make the issue more clear, here is a screenshot of the trailing null values in the SVG: