This repository has been archived by the owner on Nov 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Unsupported protocol scheme #46
Comments
Example conversion result that hits the error. // Auto-generated by the Load Impact converter
import "./libs/spo-gpo.js";
import "./libs/shim/core.js";
import URI from "./libs/urijs.js";
import aws4 from "./libs/aws4.js";
export let options = { maxRedirects: 4 };
const Request = Symbol.for("request");
postman[Symbol.for("initial")]({
options
});
export default function() {
postman[Request]({
name: "discovery",
id: "aa538977-373a-463b-937a-f371ddd71968",
method: "GET",
address:
"https://{replaced_url}",
auth(config, Var) {
const address = new URI(config.address);
const options = {
method: "GET",
protocol: address.protocol(),
hostname: address.hostname(),
port: address.port(),
path: address.path() + address.search(),
region: "eu-west-1",
service: "cf"
};
const credential = {
accessKeyId: "{replaced_access_key}",
secretAccessKey: "{replaced_secret_key}"
};
const signed = aws4.sign(options, credential);
const [path, query] = signed.path.split("?");
config.address = new URI()
.protocol(address.protocol())
.hostname(signed.hostname)
.path(path)
.query(query)
.toString();
Object.assign(config.headers, signed.headers);
}
});
} |
This might be something to do with the AWS auth logic. |
I remember now I saw this and thought AWS requests require a query, so it wouldn't come up. It happens when the URL has no query string. You end up with I'll get a patch underway, but you can work around it by changing this line: const [path, query] = signed.path.split("?"); To this, to default query to the right type even when it's empty: const [path, query = ""] = signed.path.split("?"); |
That worked! Thank you ever so much for looking into this! |
Quite welcome! |
Opened #47 to patch this. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
A runtime error is observed with a certain collection:
Reported by @danni-popova in #43.
The text was updated successfully, but these errors were encountered: