Skip to content

When listening to channels, curl_options_common is ignored, which may lead to confusing errors #85

@onnozweers

Description

@onnozweers

This is the standard config in ada/etc/ada.conf:

# Adding --ipv4 to the default curl options.
# We're running on an IPv4 only system, but curl still tries IPv6.
# When the API is down, curl will say "Network is unreachable";
# But curl --ipv4 will say: "Connection refused" which is more clear.

curl_options_common=(
                      -H "accept: application/json"
                      --fail --silent --show-error
                      --ipv4
                    )

It turns out, that when listening to a channel, curl_options_common is not used, and then the --ipv4 option is skipped, which may lead to an error (if IPv6 is not properly supported).

I think it's this piece of code:

    curl "${curl_authorization[@]}" \
         "${curl_options_stream[@]}" \
         -X GET "$channel" \
         "${last_event_id_header[@]}"

curl_options_common is not in here by design, because listening to channels required some different curl options than most other API operations.

Options:

  • Add curl_options_stream to ada/etc/ada.conf with an --ipv4 option. This is easy.
  • Make sure curl_options_common is applied to ALL operations. We'd have to move some curl arguments around to make this work.

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