Skip to content
This repository has been archived by the owner on Mar 7, 2020. It is now read-only.

Fix bug occurring when trailing newline characters are used with url_mode #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

developius
Copy link
Contributor

  • trim trailing newline characters from the URL in url_mode (was creating invalid URLs)
  • add a default user agent to download files without triggering WAFs etc

Thanks to @vielmetti for helping to identify the issues 👍

Signed-off-by: Finnian Anderson [email protected]

@vielmetti
Copy link

In particular, if you invoke colorise with

echo http://example.com/picture.jpg | faas-cli invoke colorise > picture-colored.png

the function will get an argument "http://example.com/picture.jpg\n" from the echo command. The workaround until this patch lands is to use "echo -n".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants