Failed to handle redirect to download dynamodb_local
- Dominant language
- JavaScript
- Stars
- 34
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
Current implementation does not cater for redirect, causing error when downloading dynamodb_local
```
/Users/anggra/Documents/Work/web/testing/node_modules/dynamodb-localhost/dynamodb/installer.js:23
throw new Error('Error getting DynamoDb local latest tar.gz location ' + response.headers.location + ': ' + response.statusCode);
^
Error: Error getting DynamoDb local latest tar.gz location http://103.1.138.149/s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz: 302
at ClientRequest. (/Users/anggra/Documents/Work/web/testing/node_modules/dynamodb-localhost/dynamodb/installer.js:23:23)
at Object.onceWrapper (events.js:291:19)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:189:7)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:522:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
at Socket.socketOnData (_http_client.js:411:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:189:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:551:20)
```
I've created a fix at https://github.com/anggras/dynamodb-localhost/tree/handle-redirect
Please let me know if it is acceptable
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in dynamodb/installer.js at the reported line and reproduce the dynamodb_local download to inspect the 302 response. Done means the redirect is handled and the archive downloads without the reported error; the issue also links an existing fix branch for comparison.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100