Skip to main content
Participating Frequently
Jul 12, 2021 9:07 PM UTC

cURL https oddity

Anybody got any clues as to why

curl -k -s -v -o htmlu.txt "https://my.url"

when issues in a shell script using sh /tmp/my.stdin would give

Protocol ""https" not supported or disabled in libcurl

when the exact same command cut/pasted onto the OMVS shell

works fine ?

Hank

------------------------------
hank oerlemans
Senior Technical Specialist
Self Registered
North Sydney NSW Australia
------------------------------

    3 replies

    Participating Frequently
    Jul 12, 2021 9:34 PM UTC
    Anybody got any clues as to why

    curl -k -s -v -o htmlu.txt "https://my.url"

    when issues in a shell script using sh /tmp/my.stdin would give

    Protocol ""https" not supported or disabled in libcurl

    when the exact same command cut/pasted onto the OMVS shell

    works fine ?

    Hank

    ------------------------------
    hank oerlemans
    Senior Technical Specialist
    Self Registered
    North Sydney NSW Australia
    ------------------------------
    Always the way.....light appears after I post.

    I have to work out how to get the quotes around the URL interpreted properly by the shell I think. Backslash doesn't work.

    ------------------------------
    hank oerlemans
    Senior Technical Specialist
    Self Registered
    North Sydney NSW Australia
    ------------------------------
    Sergey Rezepin
    Rocketeer
    Jul 15, 2021 2:23 PM UTC
    Anybody got any clues as to why

    curl -k -s -v -o htmlu.txt "https://my.url"

    when issues in a shell script using sh /tmp/my.stdin would give

    Protocol ""https" not supported or disabled in libcurl

    when the exact same command cut/pasted onto the OMVS shell

    works fine ?

    Hank

    ------------------------------
    hank oerlemans
    Senior Technical Specialist
    Self Registered
    North Sydney NSW Australia
    ------------------------------

    Hi Hank,

    This errors usually occurs when URL cannot be read properly.

    It looks, the protocol name was read as ""https"  instead of "https". Could you check if you have extra double quotes in your script?

    You can also try to skip the quotes around URL:

    curl -k -s -v -o htmlu.txt https://example.com

    It should work in mostly cases.

    Thanks,

    Sergey



    ------------------------------
    Sergey Rezepin
    Rocket Software
    ------------------------------
    Participating Frequently
    Jul 15, 2021 7:21 PM UTC

    Hi Hank,

    This errors usually occurs when URL cannot be read properly.

    It looks, the protocol name was read as ""https"  instead of "https". Could you check if you have extra double quotes in your script?

    You can also try to skip the quotes around URL:

    curl -k -s -v -o htmlu.txt https://example.com

    It should work in mostly cases.

    Thanks,

    Sergey



    ------------------------------
    Sergey Rezepin
    Rocket Software
    ------------------------------
    Ah well I decided I am likely the worst shell scripter I know !

    I am having much more success running my prototyping via Rexx - which I've been using for much longer and I can work with syscalls and spawn more easily.
    Thx for taking an interest.

    ------------------------------
    hank oerlemans
    Senior Technical Specialist
    Self Registered
    North Sydney NSW Australia
    ------------------------------