Huachao / vscode-restclient

REST Client Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=humao.rest-client
MIT License
5.32k stars 445 forks source link

Line feed and carriage return being added to uploaded file. #1305

Open wuzzard opened 1 month ago

wuzzard commented 1 month ago

Steps to Reproduce:

Request:

POST http:<somepath>/upload HTTP/1.1 Content-Type: application/octet-stream x-mystuff-checksum: 1234....

< C:\somepath\test.txt

The file is 25 bytes of plain text with no carriage return or line feed.

Upon receipt in the service controller, the file has 27 bytes. Examining the stream shows that is has "\r\n" added to the end.

This breaks the checksum we also attach to the request as the last two characters are not really in the file.