-
Notifications
You must be signed in to change notification settings - Fork 117
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
HTTP Path is not passed in to handler in http mode #16
Comments
Patch for the fix: https://gist.github.com/alexellis/ba1c3b0fdde166a937810c262d4378df |
I experienced the same issue with querystring variables not being passed to the nodejs handler. Do you plan to merge the patch anytime soon? |
I am having the same problem: not being able to access GET parameters of the query. It would be nice if you could merge the patch. |
I tried with the patch, where should I access the Query ? I tried to print Header & Body of WorkaroundI succeded to get path and query of the url by tweaking this file: You should do something like this: req := handler.Request{
Body: input,
Header: r.Header,
QueryString: r.URL.Path + "/?" + r.URL.RawQuery,
} Do not forget to compile ./watchdog with the patch for this to work. |
QueryString is passed, use the latest release of the project: https://github.com/openfaas-incubator/of-watchdog/blob/master/executor/http_runner.go#L102 This issue is about the URL Path, not the QueryString. Alex |
Expected Behaviour
Paths should be forwarded to the upstream function.
Current Behaviour
I tried to run a SimpleHTTPServer in Python and noticed the file-browser wasn't passing through the path.
Possible Solution
Update the proxying code to pass the requestURI
Steps to Reproduce (for bugs)
port=8081 mode=http fprocess="python -m SimpleHTTPServer" upstream_url="http://127.0.0.1:8000" ./of-watchdog
Browse into a directory and see it doesn't work
Context
Running as a Go binary outside of Docker.
We should be careful to test this change since the templates only bind to a single path anyway of
/
https://github.com/openfaas-incubator/node8-express-template/blob/master/template/node8-express/index.js#L83
The text was updated successfully, but these errors were encountered: