Skip to content

Replace SoupURI with GUri

Patrick Griffis requested to merge wip/soup-uri-removal into master

This removes SoupURI and replaces it with GUri.

Things worth noting/discussing:

  • SoupURI normalized all parsed URIs and we do not control the parsing of GUri. Thus all incoming URIs must pass through soup_normalize_uri() or soup_uri_parse_normalized().
  • We now normalize default ports. Previously we could just omit them from created strings but we don't control g_uri_to_string() now. This is per the RFC but is a subtle behavior change.
  • SoupServer used the special * path previously. GUri only allows valid absolute paths and this is now unsupported.
  • SoupURI's default parsing was equivalent to using G_URI_FLAGS_PARSE_RELAXED which allows various invalid URIs. ATM I'm simply not using that but maybe we should retain it?
  • I still need to document the new APIs, and perhaps make most of them private. Thoughts on which should be public are appreciated (also can bikeshed the names).
  • SoupURI was a mutable type and we change them in place in various places. GUri requires copies and we call soup_message_set_uri() more often after those copies which emits a change signal. Don't know if this matters.

I've fixed most test failures but a few remain. They are likely instances of missing normalization or bad comparisons somewhere that causes equality checks to fail.

Test failures:

  • auth-test/ntlm-test/server-auth-test
  • server-test
  • sniffing-test

CC @danw, @csaavedra, @carlosgc, @malureau

Edited by Patrick Griffis

Merge request reports