Skip to content

Commit 2245a9f

Browse files
committed
force usage of fullUrl in wget (query strings)
1 parent cd5cc0c commit 2245a9f

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/targets/wget.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = function (options) {
4040

4141
code.push(opts.short ? '-O' : '--output-document');
4242

43-
code.push(util.format('- "%s"', this.source.url));
43+
code.push(util.format('- "%s"', this.source.fullUrl));
4444

4545
return code.join(opts.indent !== false ? ' \\\n' + opts.indent : ' ');
4646
};

‎test/targets/wget.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Wget', function () {
1111
});
1212

1313
result.should.be.a.String;
14-
result.should.eql('wget --quiet --method POST --header "Cookie: bar=baz" --header "Content-Type: application/json" --body-data "{\\"foo\\": \\"bar\\"}" --output-document - "http://httpconsole.com/debug"');
14+
result.should.eql('wget --quiet --method POST --header "Cookie: bar=baz" --header "Content-Type: application/json" --body-data "{\\"foo\\": \\"bar\\"}" --output-document - "http://httpconsole.com/debug?foo=bar"');
1515

1616
done();
1717
});
@@ -23,7 +23,7 @@ describe('Wget', function () {
2323
});
2424

2525
result.should.be.a.String;
26-
result.should.eql('wget -q --method POST --header "Cookie: bar=baz" --header "Content-Type: application/json" --body-data "{\\"foo\\": \\"bar\\"}" -O - "http://httpconsole.com/debug"');
26+
result.should.eql('wget -q --method POST --header "Cookie: bar=baz" --header "Content-Type: application/json" --body-data "{\\"foo\\": \\"bar\\"}" -O - "http://httpconsole.com/debug?foo=bar"');
2727

2828
done();
2929
});
@@ -36,7 +36,7 @@ describe('Wget', function () {
3636
});
3737

3838
result.should.be.a.String;
39-
result.should.eql('wget -v --method POST --header "Cookie: bar=baz" --header "Content-Type: application/json" --body-data "{\\"foo\\": \\"bar\\"}" -O - "http://httpconsole.com/debug"');
39+
result.should.eql('wget -v --method POST --header "Cookie: bar=baz" --header "Content-Type: application/json" --body-data "{\\"foo\\": \\"bar\\"}" -O - "http://httpconsole.com/debug?foo=bar"');
4040

4141
done();
4242
});
@@ -47,7 +47,7 @@ describe('Wget', function () {
4747
});
4848

4949
result.should.be.a.String;
50-
result.replace(/\\\n/g, '').should.eql('wget --quiet @--method POST @--header "Cookie: bar=baz" @--header "Content-Type: application/json" @--body-data "{\\"foo\\": \\"bar\\"}" @--output-document @- "http://httpconsole.com/debug"');
50+
result.replace(/\\\n/g, '').should.eql('wget --quiet @--method POST @--header "Cookie: bar=baz" @--header "Content-Type: application/json" @--body-data "{\\"foo\\": \\"bar\\"}" @--output-document @- "http://httpconsole.com/debug?foo=bar"');
5151

5252
done();
5353
});

0 commit comments

Comments
 (0)