lib/fetcher: Factor out HTTP status code handling from soup and curl

Use the same G_IO_ERROR_* values for HTTP status codes in both fetchers.
The libsoup fetcher still handles a few more internal error codes than
the libcurl one; this could be built on in future.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #1594
Approved by: jlebon
This commit is contained in:
Philip Withnall authored and Atomic Bot committed 2018-05-30 16:23:57 +00:00
1 parent 78f40136db
commit 197644c406
4 files changed
+26 -22

No files matched your search

+2
View File
@@ -78,6 +78,8 @@ void _ostree_fetcher_journal_failure (const char *remote_name,
gboolean _ostree_fetcher_should_retry_request (const GError *error,
guint n_retries_remaining);
GIOError _ostree_fetcher_http_status_code_to_io_error (guint status_code);
G_END_DECLS
#endif