LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-30-2020, 08:22 AM   #1
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Arrow curl: Port number ended with 'I'


From: https://www.ibm.com/support/pages/no...fileoperations


Code:
curl -k -i -X POST -d ' { "path" : "/" }' https://USER:PASSWORD@HOST:9092/files/browse

I tried:
Code:
curl  -k -i -x POST -d '{ "path" : "/" }' https://example.com:abc@@53096wrxgcg.ibmaspera.com:33001/files/workspaces/12345/all/11111:2

Here `example.com` is username, `abc@` is password, `53096wrxgcg.ibmaspera.com` is host.

Error message:
Code:
curl: (3) Port number ended with 'I'

What am I doing wrong here?

Last edited by Aquarius_Girl; 10-30-2020 at 08:28 AM.
 
Old 10-30-2020, 08:37 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I am not sure what's wrong, but the double @ sign looks incorrect. Also, not -x but -X.

EXIT: The lower-case -x sets the proxy instead of the intended method. I suppose curl gets thoroughly confused by your command string.

Last edited by berndbausch; 10-30-2020 at 08:43 AM. Reason: typo
 
1 members found this post helpful.
Old 10-30-2020, 08:38 AM   #3
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
@ is the part of the password. -x was accidental. I replaced it with -X.

What to do is @ is the part of the password?
 
Old 10-30-2020, 08:48 AM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Can't you just quote the URL?

Last edited by dugan; 10-30-2020 at 08:49 AM.
 
Old 10-30-2020, 08:52 AM   #5
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
@dugan:

I tried:

Code:
curl  -k -i -X POST -d '{ "path" : "/" }' 'https://example.com':'abc@'@53096wrxgcg.ibmaspera.com:33001/files/workspaces/12345/all/11111:2
It still results in same error.

Last edited by Aquarius_Girl; 10-30-2020 at 09:00 AM.
 
Old 10-30-2020, 08:56 AM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
This answer seems to recommend rewriting the command to not use "-X POST".

https://stackoverflow.com/a/58131250/240515
 
1 members found this post helpful.
Old 10-30-2020, 09:29 AM   #7
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
This way that error has gone:

Code:
$ curl --local-port 33001 -u abc@pqr.com -k -i -X POST -d '{ "path" : "/" }' http://53096wrxgcg.ibmaspera.com/files/workspaces/12345/all/23456:2

Enter host password for user 'abc@pqr.com':

HTTP/1.1 301 Moved Permanently
Location: https://53096wrxgcg.ibmaspera.com/files/workspaces/12345/all/23456:2
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:; style-src 'self' 'unsafe-inline'
Cache-Control: no-cache
Access-Control-Allow-Credentials: false
Date: Fri, 30 Oct 2020 14:22:14 GMT
Server: ibmaspera.com
Connection: close
Content-Length: 0
 
Old 10-30-2020, 10:32 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,802

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
didn't you mix the letter i and number 1 ?
from the other hand if username contained a @ you cannot put it into the url, that may cause confusion/conflict. use curl with --user or --netrc (or similar).
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Curl-OPENSSL1 update for SUSE 11 SP4 - Backdates Curl DaveUSC SUSE / openSUSE 5 05-31-2019 02:04 PM
[SOLVED] Slackware ARM 14.2 - Updates Rollback - curl-7.57.0 - curl-7.58.0 abga Slackware - ARM 13 02-02-2018 11:44 AM
CentOS 6.7 has really OLD curl. Best way to update curl? sneakyimp Linux - Server 4 04-26-2016 03:06 PM
Identify and explain the major number, minor number, and revision number in Linux... turbomen Linux - Newbie 1 11-16-2010 02:48 AM
cURL: Server has many IPs, how would I make a cURL script use those IPs to send data? guest Programming 0 04-11-2009 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration