Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use dataurlencode #249

Open
libin0811 opened this issue Sep 1, 2022 · 4 comments
Open

use dataurlencode #249

libin0811 opened this issue Sep 1, 2022 · 4 comments

Comments

@libin0811
Copy link

Describe the bug
has error when i use dataurlencode method

Environment
Special configuration in /etc/hosts ?
Reverse proxy ?
VPN ? Y/N
Proxy ? Y/N

Curl command line
Please provide (if allowed) the full curl command line
And (if possible) give me the access to hit the endpoint myself.
image

Expected behavior
A clear and concise description of what you expected to happen while using the real cURL command.

Stacktrace
2022-09-01 Caused by: org.toilelibre.libe.curl.Curl$CurlException: org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --dataurlencode
2022-09-01 at org.toilelibre.libe.curl.ReadArguments.getCommandLineFromRequest(ReadArguments.java:34) ~[curl-0.0.39.jar:?]
2022-09-01 at org.toilelibre.libe.curl.ReadArguments.getCommandLineFromRequest(ReadArguments.java:18) ~[curl-0.0.39.jar:?]
2022-09-01 at org.toilelibre.libe.curl.Curl.curl(Curl.java:67) ~[curl-0.0.39.jar:?]
2022-09-01 at org.toilelibre.libe.curl.Curl$CurlArgumentsBuilder.run(Curl.java:171) ~[curl-0.0.39.jar:?]
2022-09-01 at com.baosight.eplat.be.ce.service.ServiceBECE460.insertMachineByGrovvyScript(ServiceBECE460.java:442) ~[classes/:2.0.0-SNAPSHOT]
2022-09-01 ... 152 more
2022-09-01 Caused by: org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --dataurlencode
2022-09-01 at org.apache.commons.cli.DefaultParser.handleUnknownToken(DefaultParser.java:360) ~[commons-cli-1.4.jar:1.4]
2022-09-01 at org.apache.commons.cli.DefaultParser.handleLongOptionWithoutEqual(DefaultParser.java:407) ~[commons-cli-1.4.jar:1.4]
2022-09-01 at org.apache.commons.cli.DefaultParser.handleLongOption(DefaultParser.java:384) ~[commons-cli-1.4.jar:1.4]
2022-09-01 at org.apache.commons.cli.DefaultParser.handleToken(DefaultParser.java:239) ~[commons-cli-1.4.jar:1.4]
2022-09-01 at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:120) ~[commons-cli-1.4.jar:1.4]
2022-09-01 at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:76) ~[commons-cli-1.4.jar:1.4]
2022-09-01 at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:60) ~[commons-cli-1.4.jar:1.4]
2022-09-01 at org.toilelibre.libe.curl.ReadArguments.getCommandLineFromRequest(ReadArguments.java:31) ~[curl-0.0.39.jar:?]
2022-09-01 at org.toilelibre.libe.curl.ReadArguments.getCommandLineFromRequest(ReadArguments.java:18) ~[curl-0.0.39.jar:?]
2022-09-01 at org.toilelibre.libe.curl.Curl.curl(Curl.java:67) ~[curl-0.0.39.jar:?]
2022-09-01 at org.toilelibre.libe.curl.Curl$CurlArgumentsBuilder.run(Curl.java:171) ~[curl-0.0.39.jar:?]

@libin0811
Copy link
Author

"--data-urlencode" or "--dataurlencode" ?

@libetl
Copy link
Owner

libetl commented Sep 2, 2022

interesting...

@libetl
Copy link
Owner

libetl commented Sep 3, 2022

it is a bug with the ArgumentsBuilderGenerator
the generator adds the short opt method and only the long opt method if the method names are different.
It should be the other way around
the generator should add the long opt method and only the short opt method if the method names are different.

@libetl
Copy link
Owner

libetl commented Sep 3, 2022

please retest with 0.0.40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants