sterodium / selenium-grid-extensions

Set of Selenium Grid extensions for a better UI tests.
Apache License 2.0
46 stars 23 forks source link

Download file fails if spaces in names are exist #68

Closed myznikov closed 6 years ago

myznikov commented 6 years ago

Hello All, We found out files with spaces in names cannot be downloaded or deleted due to one-directional UrlEncode on clients without of UrlDecode on servlets. So symbols ' ' are being translated to '+' and file cannpt be found. I have two solutions:

  1. Add UrlDecode to FileDownloadServlet and FileDeleteServlet. It works while we don't try to download file with symbol '+' in name. It's always translated back to ' ' during decoding, so file name becames incorrect again.
  2. Use java.util.Base64.getUrlEncoder. It works always correctly but URLs are going to be not human-readable.

I have both solutions working locally, so can make Pull request for any of them.

echoAlexey commented 6 years ago

Hi, @myznikov , you can make PR and I will merge it :) I don't use this project atm and don't have time to improve it.

myznikov commented 6 years ago

I was not sure what of two alternative soulutions should be pushed. If you do not want to make a decision too, I prefer to use base64 encoding then.