Skip to content

Failed to handle redirect to download dynamodb_local #20

Open
@anggras

Description

@anggras

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.<anonymous> (/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions