Skip to content

Running curl with --doh-url seems to turn on verbose output #3660

Closed

Description

@bikeseat

I did this

curl --doh-url https://1.1.1.1/dns-query ipinfo.io/8.8.8.8

I expected the following

I expected non-verbose output. This gives me what I expect
curl --doh-url https://1.1.1.1/dns-query ipinfo.io/8.8.8.8 2>/dev/null

curl/libcurl version

curl 7.64.1-DEV (x86_64-apple-darwin18.2.0) libcurl/7.64.1-DEV SecureTransport zlib/1.2.11 libidn2/2.1.1 librtmp/2.3 Release-Date: [unreleased] Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp Features: AsynchDNS IDN IPv6 Largefile libz NTLM NTLM_WB SSL UnixSockets

operating system

macOS Mojave 10.14.3 (18D109)

Activity

  1. jay commented on Mar 9, 2019

    @jay
    Member

    Confirmed.

    diff --git a/lib/doh.c b/lib/doh.c
    index f06ed33..746b8ca 100644
    --- a/lib/doh.c
    +++ b/lib/doh.c
    @@ -242,7 +242,6 @@ static CURLcode dohprobe(struct Curl_easy *data,
         ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
     #endif
         ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
    -    ERROR_CHECK_SETOPT(CURLOPT_VERBOSE, 1L);
         doh->set.fmultidone = Curl_doh_done;
         doh->set.dohfor = data; /* identify for which transfer this is done */
         p->easy = doh;

    @bagder left in by accident?

  2. jay commented on Mar 9, 2019

    @jay
    Member

    on second thought it should inherit from the easy handle

    diff --git a/lib/doh.c b/lib/doh.c
    index f06ed33..5040248 100644
    --- a/lib/doh.c
    +++ b/lib/doh.c
    @@ -242,7 +242,8 @@ static CURLcode dohprobe(struct Curl_easy *data,
         ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
     #endif
         ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
    -    ERROR_CHECK_SETOPT(CURLOPT_VERBOSE, 1L);
    +    if(data->set.verbose)
    +      ERROR_CHECK_SETOPT(CURLOPT_VERBOSE, 1L);
         doh->set.fmultidone = Curl_doh_done;
         doh->set.dohfor = data; /* identify for which transfer this is done */
         p->easy = doh;

    also what's a good test site for doh, I tried cloudflare but it's not working

    curld -v --doh-url https://cloudflare-dns.com/dns-query http://www.test.com
    ...
    * DOH: Too small type A for www.test.com
    * DOH: Too small type AAAA for www.test.com
    

    It's a bug because CAINFO is not inherited and I need that in Windows. PR in #3661 to fix that and the OP's issue. And test sites are here.

  3. bagder commented on Mar 9, 2019

    @bagder
    Member

    left in by accident?

    Oops...

  4. jay commented on Mar 11, 2019

    @jay
    Member

    Thanks

  5. locked as resolved and limited conversation to collaborators on Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions