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

URL Encoding Issue For Files with Spaces #17

Open
jkkjonah opened this issue Feb 27, 2015 · 0 comments
Open

URL Encoding Issue For Files with Spaces #17

jkkjonah opened this issue Feb 27, 2015 · 0 comments

Comments

@jkkjonah
Copy link

As of today, the smush.it api endpoint expects all spaces in file name to be URL encoded pluses (%2B).

e.g.:
Image Name = image with spaces.png

This returns null:
http://www.smushit.com/ysmush.it/ws.php?img=http://s3.amazonaws.com/BUCKET/image%20with%20spaces.png

This returns the expected response:
http://www.smushit.com/ysmush.it/ws.php?img=http://s3.amazonaws.com/BUCKET/image%2Bwith%2Bspaces.png

  1. The Autosmush library does not URL encode the image file path at all before calling CURL
  2. The special case of replacing spaces with plusses needs to be added before URL encoding
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