Skip to content

Drag & Drop download params double encoded #1385

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

Closed
ggongaware opened this issue Mar 3, 2020 · 2 comments
Closed

Drag & Drop download params double encoded #1385

ggongaware opened this issue Mar 3, 2020 · 2 comments
Labels
enhancement Some improvement that isn't a feature

Comments

@ggongaware
Copy link

  • code-server version: 2.1698-vsc1.41.1 x84_64
  • OS Version: Amazon Linux

Description

Drag and Drop file from Browser to Desktop yield 404 error In chrome from MacOS.

Path query parameters are double escaped, and rejected with a 404.

I captured traffic packets to see the root cause:

 GET /vscode-remote-resource?path%3D%252Fhome%252Fec2-user%252Ftm-xx%252Flogs%252F2020-02-01-xx.log.gz%26tkn%3D HTTP/1.1
 Host: xxx
 Connection: keep-alive
 Referer: xxx/?folder=vscode-remote%3A%2F%2Fxx%3A8080%2Fhome%2Fec2-user%2Ftm-xx
 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36
 Accept-Encoding: gzip, deflate
 Accept-Language: en-US,en;q=0.9,es;q=0.8
 Cookie: key=xxx

 HTTP/1.1 404 Not Found
 Date: Tue, 03 Mar 2020 16:56:55 GMT
 Connection: keep-alive
 Transfer-Encoding: chunked

Manually fixed with a curl request for testing:

curl -v "http://xxx/vscode-remote-resource?path=%2Fhome%2Fec2-user%2Ftm-xx%2Flogs%2F2020-02-01-xx.log.gz&tkn="

HTTP/1.1 200 OK
Content-Type: text/plain
Date: Tue, 03 Mar 2020 17:02:00 GMT
Connection: keep-alive
Transfer-Encoding: chunked

Steps to Reproduce

  1. Drag file out
  2. Observe empty file error
@ggongaware ggongaware added the bug Something isn't working label Mar 3, 2020
@kylecarbs
Copy link
Member

We don't currently have functionality for downloading files.

Will add!

@kylecarbs kylecarbs added enhancement Some improvement that isn't a feature and removed bug Something isn't working labels Mar 3, 2020
@kylecarbs
Copy link
Member

Tracking here: #1386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvement that isn't a feature
Projects
None yet
Development

No branches or pull requests

2 participants