Skip to content

Commit

Permalink
4.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
verhovsky committed Dec 3, 2022
1 parent fa97aff commit f85299e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Limitations:

- Only HTTP is supported
- If multiple URLs are passed only the last one is used
- By default, curl doesn't follow redirects but the generated Python code does, to keep it simpler. Unless you explicitly set the redirect policy with `-L`/`--location`/`--no-location`, the conversion is strictly speaking incorrect if the server responds with a redirect
- By default, curl doesn't follow redirects but the generated code will do whatever the default is for that runtime, to keep it simpler. For example Python's Requests follows redirects by default, so unless you explicitly set the redirect policy with `-L`/`--location`/`--no-location`, the resulting code will not do what curl would do if the server responds with a redirect
- Code generators for other languages are less thorough than the Python generator
- and much more

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "curlconverter",
"version": "4.4.0",
"version": "4.4.1",
"description": "convert Curl commands to Python, JavaScript, Go, PHP and other languages",
"homepage": "https://curlconverter.com",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import { _toRust, toRustWarn } from "./generators/rust.js";
import fs from "fs";

// This line is updated by extract_curl_args.py
const VERSION = "4.4.0 (curl 7.82.0)";
const VERSION = "4.4.1 (curl 7.82.0)";

// sets a default in case --language isn't passed
const defaultLanguage = "python";
Expand Down
5 changes: 4 additions & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,10 @@ function buildRequest(
if (parsedArguments.url.length > 1) {
warnings.push([
"multiple-urls",
"found multiple URLs, only the last one will be used",
"found " +
parsedArguments.url.length +
" URLs, only the last one will be used: " +
parsedArguments.url.map(JSON.stringify).join(", "),
]);
}
let url = parsedArguments.url[parsedArguments.url.length - 1];
Expand Down

0 comments on commit f85299e

Please sign in to comment.