flatpak-http: Restructure the soup http implementation

This miniminzes the soup implementation by moving it out of the
highlevel multiple-retry entry points and simplifying the
lower level part to use only one shared helper.

This will also make it easier to replace the soup specific
parts.
This commit is contained in:
Alexander Larsson 2022-06-15 12:18:45 +02:00 committed by Alexander Larsson
parent 0de4800c3b
commit 0c6bb85cb6
3 changed files with 795 additions and 780 deletions

File diff suppressed because it is too large Load Diff

View File

@ -52,11 +52,11 @@ assert_cached() {
}
assert_304() {
assert_result "Server returned status 304:" $@
assert_result "Server returned status 304" $@
}
assert_ok() {
assert_result "Server returned status 200:" $@
assert_result "Server returned status 200" $@
}

View File

@ -192,7 +192,7 @@ port=$(cat httpd-port)
if ${FLATPAK} ${U} install -y http://127.0.0.1:${port}/nonexistent.flatpakref &> install-error-log; then
assert_not_reached "Should not be able to install a nonexistent flatpakref"
fi
assert_file_has_content install-error-log "Server returned status 404: Not Found"
assert_file_has_content install-error-log "Server returned status 404"
ok "install fails gracefully for 404 URLs"