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

RequestError: URI malformed after updating to v2.0 #3080

Closed
taaning opened this issue Jul 22, 2021 · 1 comment
Closed

RequestError: URI malformed after updating to v2.0 #3080

taaning opened this issue Jul 22, 2021 · 1 comment

Comments

@taaning
Copy link

taaning commented Jul 22, 2021

Current Behavior

Comes up with URI malformed when using '%' in function node.
Link to forum post
https://discourse.nodered.org/t/http-request-node-not-working-after-update-to-v2-0-1/48713/3?u=thansen

Expected Behavior

The function node should return a valid string to the http request node

Steps To Reproduce

See example flow

Example flow

[{"id":"7ef673ed0a4b0b69","type":"tab","label":"Dahua debug","disabled":false,"info":""},{"id":"124d4209363f75c8","type":"function","z":"7ef673ed0a4b0b69","name":"","func":"msg.payload = 'Temperature ' + '24,0' + '°' + '|' + 'Humidity ' + '80' + '%' + '|' + 'Wind Speed' + '8,3' + 'm/s';\nreturn [msg];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":140,"wires":[["3f5b4222c9c34487","6b974c8fe4a5a5b4"]],"info":"# dette er en test\n\n> asas\n> efe\n> 3434\n> wrwew\n\n"},{"id":"6b974c8fe4a5a5b4","type":"http request","z":"7ef673ed0a4b0b69","name":"","method":"POST","ret":"bin","paytoqs":"ignore","url":"http://192.168.1.40/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text={{payload}}","tls":"","persist":false,"proxy":"","authType":"digest","x":590,"y":140,"wires":[[]],"info":"# 112\n## 1212\n### 1212\n"},{"id":"18a62be8bb38520f","type":"inject","z":"7ef673ed0a4b0b69","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":140,"wires":[["124d4209363f75c8"]]},{"id":"3f5b4222c9c34487","type":"debug","z":"7ef673ed0a4b0b69","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":590,"y":180,"wires":[]}]

Environment

  • Node-RED version: v2.0.2
  • Node.js version: v12.22.2
  • npm version: ?
  • Platform/OS: Raspberry Pi 4 / Raspbian V10 (buster)
  • Browser: Chrome
@hardillb
Copy link
Member

Quick workaround for this while we look at it. Set the function node to:

msg.payload = encodeURIComponent('Temperature ' + '24,0' + '°' + '|' + 'Humidity ' + '80' + '%' + '|' + 'Wind Speed' + '8,3' + 'm/s');
return [msg];

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

No branches or pull requests

2 participants