1. 05 Jul, 2022 1 commit
  2. 03 Jul, 2022 1 commit
  3. 02 Jul, 2022 2 commits
  4. 30 Jun, 2022 21 commits
  5. 29 Jun, 2022 4 commits
  6. 28 Jun, 2022 7 commits
  7. 27 Jun, 2022 4 commits
    • Michael Catanzaro's avatar
      gproxyresolver: add asserts to ensure error is set · 8e298651
      Michael Catanzaro authored
      This will catch buggy implementations of GProxyResolver before they are
      able to return bogus results to higher level code. In particular, if
      g_proxy_resolver_lookup() returns NULL, it'd better set an error to
      explain why.
      8e298651
    • Michael Catanzaro's avatar
      proxyaddressenumerator: set error parameter more thoughtfully · 1738fad1
      Michael Catanzaro authored
      It doesn't make sense for a proxy resolver to return NULL without an
      error on the first call. Whereas a DNS resolver would do this to
      indicate that a query completed successfully but found no results, a
      proxy resolver should return "direct://" instead. Therefore, if we are
      going to return NULL, we ought to have an error as well. Let's make sure
      this actually happens by adding some fallback errors just in case
      GProxyResolver feeds us weird results.
      
      Additionally, we should not return any errors except
      G_IO_ERROR_CANCELLED after the very first iteration. This is an API
      contract of GSocketAddressEnumerator. Let's add some checks to ensure
      this.
      
      Note that we have inadequate test coverage for GProxyAddressEnumerator.
      It's tested here only via GSocketClient. We could do a bit better by
      testing it directly as well. For example, I've added tests to see what
      happens when GProxyResolver returns both a valid and an invalid URI, but
      it's not so interesting here because GSocketClient always uses the valid
      result and ignores the error from GProxyAddressEnumerator.
      
      Fixes #2597
      1738fad1
    • Michael Catanzaro's avatar
      gsimpleproxyresolver: ensure default proxy is valid · 6f83f45d
      Michael Catanzaro authored
      It should be either a valid URI, or NULL. Passing empty strings or other
      invalid URIs is no bueno.
      6f83f45d
    • Michael Catanzaro's avatar
      gsimpleproxyresolver: default_proxy should be consistently nullable · 8a1f087a
      Michael Catanzaro authored
      Currently it's nullable in g_simple_proxy_resolver_new(), but not in
      g_simple_proxy_resolver_set_default_proxy() nor the property. Fix these.
      8a1f087a