Open RenaudDemarneffe opened 5 years ago
Hi , have you tried the suggested solution here: https://github.com/travelaudience/nexus-proxy/issues/18 ?
Hi, I tested the solution but it doesn't work.
I'm experiencing the same problem, @RenaudDemarneffe Did you find a workaround?
Hi @mahcr, I have updated the order used to set the headers of the response but I don't know if it's the right solution. Here is the updated file: https://github.com/ipulses/nexus-proxy/blob/master/src/main/java/com/travelaudience/nexus/proxy/NexusHttpProxy.java
@Tavardit I have the same problem with npm (I'm using Nexus 3.19.1, i did some tests with local docker image and the npm repository works with Nexus> = 3.18, so i think Nexus image is ok). Here the log of command npm addUser
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/Users/xpicio/.nvm/versions/node/v12.13.1/bin/node',
1 verbose cli '/Users/xpicio/.nvm/versions/node/v12.13.1/bin/npm',
1 verbose cli 'addUser'
1 verbose cli ]
2 info using npm@6.12.1
3 info using node@v12.13.1
4 verbose npm-session 9b6549067905557d
5 verbose web login before first POST
6 verbose adduser before first PUT {
6 verbose adduser _id: 'org.couchdb.user:xpicio@gmail.com',
6 verbose adduser name: 'xpicio@gmail.com',
6 verbose adduser password: 'XXXXX',
6 verbose adduser email: 'xpicio@gmail.com',
6 verbose adduser type: 'user',
6 verbose adduser roles: [],
6 verbose adduser date: '2019-11-20T11:08:13.544Z'
6 verbose adduser }
7 verbose type system
8 verbose stack FetchError: request to https://repository.scmgroup.com/repository/mconnect-npm/-/user/org.couchdb.user:xpicio%40gmail.com failed, reason: Parse Error: Content-Length can't be present with chunked encoding
8 verbose stack at ClientRequest.<anonymous> (/Users/xpicio/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
8 verbose stack at ClientRequest.emit (events.js:210:5)
8 verbose stack at TLSSocket.socketOnData (_http_client.js:463:9)
8 verbose stack at TLSSocket.emit (events.js:210:5)
8 verbose stack at addChunk (_stream_readable.js:309:12)
8 verbose stack at readableAddChunk (_stream_readable.js:290:11)
8 verbose stack at TLSSocket.Readable.push (_stream_readable.js:224:10)
8 verbose stack at TLSWrap.onStreamRead (internal/stream_base_commons.js:182:23)
9 verbose cwd /Users/xpicio/Documents/Projects/scmgroup/epic-library
10 verbose Darwin 19.0.0
11 verbose argv "/Users/xpicio/.nvm/versions/node/v12.13.1/bin/node" "/Users/xpicio/.nvm/versions/node/v12.13.1/bin/npm" "addUser"
12 verbose node v12.13.1
13 verbose npm v6.12.1
14 error code HPE_UNEXPECTED_CONTENT_LENGTH
15 error errno HPE_UNEXPECTED_CONTENT_LENGTH
16 error request to https://repository.scmgroup.com/repository/mconnect-npm/-/user/org.couchdb.user:xpicio%40gmail.com failed, reason: Parse Error: Content-Length can't be present with chunked encoding
17 verbose exit [ 1, true ]
reason: Parse Error: Content-Length can't be present with chunked encoding
Could you fix this issue? Thanks in advance
@TAvardit I have the same problem with PyPI.
I used twine for the upload and it works properly.
But when I try to install the package using the command:
pip install <pkg_name> --extra-index-url <repo_url>
the error appears:
WARNING: Received response with both Content-Length and Transfer-Encoding set. This is expressly forbidden by RFC 7230 sec 3.3.2. Ignoring Content-Length and attempting to process response as Transfer-Encoding: chunked.
Having the same issue here, any update to this?
Hello,
I deployed Nexus OSS with nexus-proxy on a k8s cluster through the helm chart. I don't use GCP IAM authentication. I followed the documentation to configure the npm repositories.
When I try to download a package, I got the error HPE_UNEXPECTED_CONTENT_LENGTH.
The full error stack is the following:
2019-08-30T14_56_28_661Z-debug.log
The error seems comming from the nexus-proxy because when I disable the nexus-proxy and directly access the nexus I don't get the error.
Is there a configuration parameter to avoid this error?
Thanks for your help. Reagrds, Renaud