DOWNLOAD_MIRROR behavior has changed
See original GitHub issueVersions
- NodeJS: 14.17.3
- mongodb-memory-server-*: 7.3.1
- mongodb(the binary version): 0.0.0
- system:
package: mongo-memory-server-core
What is the Problem?
25c865c0a71e7d682eccb6f0e2895a11f9f092ef changed the behavior of the DOWNLOAD_MIRROR
option - it is no longer possible to specify a path prefix.
Code Example
export MONGOMS_DOWNLOAD_MIRROR=https://artifactory.mydomain.com/artifactory/mongo-fastdl
npm install
npm test
The above results in:
Error: Status Code isnt 200!
at ClientRequest.<anonymous> (node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownload.ts:391:20)
at HTTPParser.parserOnIncomingClient (_http_client.js:641:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
at TLSSocket.socketOnData (_http_client.js:509:22)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
at TLSWrap.callbackTrampoline (internal/async_hooks.js:131:14)
Do you know why it happens?
The URL that is being hit is https://artifactory.mydomain.com/linux/mongodb-linux-x86_64-rhel70-4.0.25.tgz (it should be https://artifactory.mydomain.com/artifactory/mongo-fastdl/linux/mongodb-linux-x86_64-rhel70-4.0.25.tgz)
This replaces the path on the download mirror:
I think that the code needs to be a bit smarter about how it adds the path suffix - maybe something like this:
const url = new URL(`${mirror.replace(/\/$/, '')}/${this.platform}/${archive}`);
return url.toString()
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Firefox 98 download behavior change is back in 102 - fix?
Back in Firefox 98, Mozilla made a change to the default download behavior that many of us didn't like . There was a...
Read more >Intel Ethernet Controller Products
This document provides an overview of the changes introduced in the latest Intel® Ethernet Controller/. Adapter family of products.
Read more >The history of the Apache mirror system
The ASF system download mirrors evolved organically, and then systematically, over 25 years. It depended on many hours of labor by volunteers and...
Read more >Plugable usb laptop dock tbt3-udz not recognizing both higher ...
I have a Lenovo T14 Gen 1 (type 20S0, 20S1) Laptop (ThinkPad) ... Interesting that switching out the monitors has changed the behavior....
Read more >Hot keys in directory favourites not always shown. - Total Commander
This Windows behavior has been discussed a couple of times on this forum alone. It can be changed in Windows' accessibility settings, so...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
this issue should be fixed with ae7ddab79fcbb637cdcd2c193554e9ba2907cf9e for runtime and 6a1636d4e319b27588a62cf66dfb8226b97d2022 for documentation
also there is #513
Thanks for the quick response!