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

POST binary file, body contains trailing 0xA byte #1340

Open
OutOfBedlam opened this issue Jan 8, 2025 · 0 comments
Open

POST binary file, body contains trailing 0xA byte #1340

OutOfBedlam opened this issue Jan 8, 2025 · 0 comments

Comments

@OutOfBedlam
Copy link

  • REST Client Version: 0.25.1
  • VSCode Version: 1.96.2
  • OS Version: macOS

Some binary content are sensitive with the extra byte.

Steps to Reproduce:

  1. make data file post-data.csv
NAME,TIME,VALUE
csv-data,1670380342000000000,1.0001
csv-data,1670380343000000000,2.0002
  1. compressed file post-data.csv.gz
gzip post-data.csv
  1. POST
POST http://localhost:8080/post/file
Content-Type: text/csv
Content-Encoding: gzip

< ./post-data.csv.gz

The server received one more byte 0x0A at the end of the actual data.
The backend (e.g. GoLang) Server's gzip decoder occurs unexpected EOF error because of the extra byte.

It should not expand the body data if the Content-Encoding is a kind of "compression".

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

1 participant