Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ SPDX-License-Identifier: curl
standardizing to curl's documentation format.

## [v2025.02.24]
* Allow `-o` and `-O` to be used without whitespaces (e.g.: `-oNAME`).
* Allow `-o` and `-O` to be used without whitespace (e.g.: `-oNAME`).
* Fix capitalization of the name of copyright owner sergiodj.
* Use the standard copyright header in manpage.
* Create a github workflow for tests and linting.
* Create a GitHub workflow for tests and linting.
* Add missing breakline to README to fix formatting.
* Update manpage to describe that `--output` can be used without the equal sign.
* Add installation instructions to README.
Expand Down Expand Up @@ -66,7 +66,7 @@ SPDX-License-Identifier: curl
output files.
* Add more tests.
* Remove the need for GNU coreutils' `realpath` for tests.
* Update manpage with links to Github and Debian's Salsa.
* Update manpage with links to GitHub and Debian's Salsa.
* Update LICENSE file with new contributors.

## [v2024-07-07]
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ parameters via the `--curl-options` option. Just beware that you likely
should be using curl directly if your use case is not covered.

* By default, **wcurl** does:
* Percent-encode whitespaces in URLs;
* Percent-encode whitespace in URLs;
* Download multiple URLs in parallel if the installed curl's version is >= 7.66.0 (`--parallel`);
* Use a total number of 5 parallel connections to the same protocol + hostname + port number target if the installed curl's version is >= 8.16.0 (`--parallel-max-host`);
* Follow redirects;
Expand Down Expand Up @@ -89,7 +89,7 @@ should be using curl directly if your use case is not covered.
* `--no-decode-filename`

Don't percent-decode the output filename, even if the percent-encoding in the
URL was done by wcurl, e.g.: The URL contained whitespaces.
URL was done by wcurl, e.g.: The URL contained whitespace.

* `--dry-run`

Expand All @@ -111,7 +111,7 @@ instead forwarded to the curl invocation.
# URL

URL to be downloaded. Anything that is not a parameter is considered
an URL. Whitespaces are percent-encoded and the URL is passed to curl, which
an URL. Whitespace is percent-encoded and the URL is passed to curl, which
then performs the parsing. May be specified more than once.

# Examples
Expand Down
18 changes: 9 additions & 9 deletions tests/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,37 +163,37 @@ testUrlDefaultNameTrailingSlash()
assertContains "Verify whether 'wcurl' chooses the correct default filename when there's no path in the URL and the URl ends with a slash" "${ret}" 'index.html'
}

testUrlDecodingWhitespaces()
testUrlDecodingWhitespace()
{
url='example.com/filename%20with%20spaces'
ret=$(${WCURL_CMD} ${url} 2>&1)
assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespaces in URLs" "${ret}" 'filename with spaces'
assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespace in URLs" "${ret}" 'filename with spaces'
}

testUrlDecodingWhitespacesTwoFiles()
testUrlDecodingWhitespaceTwoFiles()
{
url='example.com/filename%20with%20spaces'
url_2='example.com/filename2%20with%20spaces'
ret=$(${WCURL_CMD} ${url} ${url_2} 2>&1)
assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespaces in URLs" "${ret}" 'filename with spaces'
assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespaces in URLs" "${ret}" 'filename2 with spaces'
assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespace in URLs" "${ret}" 'filename with spaces'
assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespace in URLs" "${ret}" 'filename2 with spaces'
}

testUrlDecodingDisabled()
{
url='example.com/filename%20with%20spaces'
ret=$(${WCURL_CMD} --no-decode-filename ${url} 2>&1)
assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespaces in URLs" "${ret}" 'filename%20with%20spaces'
assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespace in URLs" "${ret}" 'filename%20with%20spaces'
}

testUrlDecodingWhitespacesQueryString()
testUrlDecodingWhitespaceQueryString()
{
url='example.com/filename%20with%20spaces?query=string'
ret=$(${WCURL_CMD} "${url}" 2>&1)
assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespaces in URLs with query strings" "${ret}" 'filename with spaces'
assertContains "Verify whether 'wcurl' successfully decodes percent-encoded whitespace in URLs with query strings" "${ret}" 'filename with spaces'
}

testUrlDecodingWhitespacesTrailingSlash()
testUrlDecodingWhitespaceTrailingSlash()
{
url='example.com/filename%20with%20spaces/'
ret=$(${WCURL_CMD} ${url} 2>&1)
Expand Down
8 changes: 4 additions & 4 deletions wcurl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Options:
multiple times, only the last value is considered.

--no-decode-filename: Don't percent-decode the output filename, even if the percent-encoding in
the URL was done by wcurl, e.g.: The URL contained whitespaces.
the URL was done by wcurl, e.g.: The URL contained whitespace.

--dry-run: Don't actually execute curl, just print what would be invoked.

Expand All @@ -77,7 +77,7 @@ Options:
instead forwarded to the curl invocation.

<URL>: URL to be downloaded. Anything that is not a parameter is considered
an URL. Whitespaces are percent-encoded and the URL is passed to curl, which
an URL. Whitespace is percent-encoded and the URL is passed to curl, which
then performs the parsing. May be specified more than once.
_EOF_
}
Expand Down Expand Up @@ -301,7 +301,7 @@ while [ -n "${1-}" ]; do
# This is the start of the list of URLs.
shift
for url in "$@"; do
# Encode whitespaces into %20, since wget supports those URLs.
# Encode whitespace into %20, since wget supports those URLs.
newurl=$(printf "%s\n" "${url}" | sed 's/ /%20/g')
URLS="${URLS} ${newurl}"
done
Expand All @@ -314,7 +314,7 @@ while [ -n "${1-}" ]; do

*)
# This must be a URL.
# Encode whitespaces into %20, since wget supports those URLs.
# Encode whitespace into %20, since wget supports those URLs.
newurl=$(printf "%s\n" "${1}" | sed 's/ /%20/g')
URLS="${URLS} ${newurl}"
;;
Expand Down
8 changes: 4 additions & 4 deletions wcurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ should be using curl directly if your use case is not covered.

By default, **wcurl** does:

## * Percent-encode whitespaces in URLs;
## * Percent-encode whitespace in URLs;

## * Download multiple URLs in parallel
if the installed curl's version is \>= 7.66.0 (--parallel);
Expand Down Expand Up @@ -88,7 +88,7 @@ last value is considered.
## --no-decode-filename

Don't percent-decode the output filename, even if the percent-encoding in the
URL was done by **wcurl**, e.g.: The URL contained whitespaces.
URL was done by **wcurl**, e.g.: The URL contained whitespace.

## --dry-run

Expand All @@ -110,7 +110,7 @@ is instead forwarded to the curl invocation.
# URL

URL to be downloaded. Anything that is not a parameter is considered
an URL. Whitespaces are percent-encoded and the URL is passed to curl, which
an URL. Whitespace is percent-encoded and the URL is passed to curl, which
then performs the parsing. May be specified more than once.

# EXAMPLES
Expand Down Expand Up @@ -144,7 +144,7 @@ Download multiple files without a limit of concurrent connections per host (the
# REPORTING BUGS

If you experience any problems with **wcurl** that you do not experience with
curl, submit an issue on Github: https://github.com/curl/wcurl
curl, submit an issue on GitHub: https://github.com/curl/wcurl

# COPYRIGHT

Expand Down