-
Couldn't load subscription status.
- Fork 59
Description
When asynchronous function execution completes the data is sent back to callback url. However if that callback URL issues 30x redirect (from http to https or similar), the data seems to be posted to HTTP url, server responds 30x redirect to HTTPS, another POST requests is done to HTTPS url however function output data is missing.
Expected Behaviour
- Do not follow 30x redirects - it is user's responsibility to provide correct data collector URL that is not redirecting elsewhere... OR
- Follow 30x redirects and make sure the function output is posted to redirect destination as well
Current Behaviour
Client posts back results, gets 30x redirect from server and follows redirect passing all relevant headers, but does not include data (body) in that second request
Possible Solution
Same as expected behaviour above
Steps to Reproduce (for bugs)
- Deploy something like requestbin on HTTPS with redirect from HTTP to HTTPS
- Invoke function asynchronously providing HTTP url to requestbin as callback URL
- Requestbin will see post with all headers but no body (function output)
- If callback URL is switched to HTTPS to avoid redirect, all data gets captured correctly and available in requestbin
Context
Took a long time to debug and figure out what happens there and why async functions don't return data correctly.
This was caused literally by requestbin offering URL with HTTP when server running requestbin was forcing redirect to HTTPS - found by accident.
Your Environment
faasd v0.9.6 - default install and default docker-compose.yml