Install something behind a proxy throws "Request path contains unescaped characters"
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 271
- Avg merge
- 23h 40m
- Merged PRs (30d)
- 2
Description
Running:
npm install --verbose node-libcurl --save
Behind a Squid proxy, gives the error "TypeError: Request path contains unescaped characters" (from request node module). I am not sure if this is node-pre-gyp or request related.
Stack trace:
````
> node-libcurl@1.0.0 install /home/t.decaux/builds/node_modules/node-libcurl
> node-pre-gyp install --fallback-to-build
node-pre-gyp info it worked if it ends with ok
node-pre-gyp verb cli [ '/usr/bin/nodejs',
node-pre-gyp verb cli '/home/t.decaux/builds/node_modules/node-libcurl/node_modules/.bin/node-pre-gyp',
node-pre-gyp verb cli 'install',
node-pre-gyp verb cli '--fallback-to-build' ]
node-pre-gyp info using node-pre-gyp@0.6.28
node-pre-gyp info using node@6.9.1 | linux | x64
node-pre-gyp verb command install []
node-pre-gyp info check checked for "/home/t.decaux/builds/node_modules/node-libcurl/lib/binding/node_libcurl.node" (not found)
node-pre-gyp http GET https://github.com/JCMais/node-libcurl/releases/download/v1.0.0/node_libcurl-v1.0.0-node-v48-linux-x64.tar.gz
node-pre-gyp verb download using proxy url: "http://*:*"
node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack TypeError: Request path contains unescaped characters
node-pre-gyp ERR! stack at new ClientRequest (_http_client.js:53:11)
node-pre-gyp ERR! stack at TunnelingAgent.exports.request (http.js:31:10)
node-pre-gyp ERR! stack at TunnelingAgent.createSocket (/home/t.decaux/builds/node_modules/node-libcurl/node_modules/request/tunnel.js:116:25)
node-pre-gyp ERR! stack at TunnelingAgent.createSecureSocket [as createSocket] (/home/t.decaux/builds/node_modules/node-libcurl/node_modules/request/tunnel.js:188:41)
node-pre-gyp ERR! stack at TunnelingAgent.addRequest (/home/t.decaux/builds/node_modules/node-libcurl/node_modules/request/tunnel.js:80:8)
node-pre-gyp ERR! stack at new ClientRequest (_http_client.js:160:16)
node-pre-gyp ERR! stack at Object.exports.request (http.js:31:10)
node-pre-gyp ERR! stack at Object.exports.request (https.js:199:15)
node-pre-gyp ERR! stack at Request.start (/home/t.decaux/builds/node_modules/node-libcurl/node_modules/request/main.js:428:30)
node-pre-gyp ERR! stack at Request.end (/home/t.decaux/builds/node_modules/node-libcurl/node_modules/request/main.js:817:28)
node-pre-gyp ERR! System Linux 3.16.0-4-amd64
node-pre-gyp ERR! command "/usr/bin/nodejs" "/home/t.decaux/builds/node_modules/node-libcurl/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/t.decaux/builds/node_modules/node-libcurl
node-pre-gyp ERR! node -v v6.9.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.28
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR!
````
Proxy is working fine, and I can install it fine on the same machine without proxy.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the node-pre-gyp install entry point and reproduce the download through a Squid proxy using the command and environment from the report. Inspect the request/tunnel.js stack path for how the proxy request is formed, then verify that installing node-libcurl behind the proxy completes without the unescaped-character error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- networking, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100