Add FLATPAK_HTTP_ERROR_UNAUTHORIZED (i.e. http status 401)

This commit is contained in:
Alexander Larsson
2020-05-05 10:46:44 +02:00
committed by Alexander Larsson
parent e3c31309a4
commit f6a0fa41a1
2 changed files with 6 additions and 0 deletions

View File

@@ -27,6 +27,7 @@
typedef enum {
FLATPAK_HTTP_ERROR_NOT_CHANGED = 0,
FLATPAK_HTTP_ERROR_UNAUTHORIZED = 1,
} FlatpakHttpErrorEnum;
#define FLATPAK_HTTP_ERROR flatpak_http_error_quark ()

View File

@@ -437,6 +437,11 @@ load_uri_callback (GObject *source_object,
code = FLATPAK_HTTP_ERROR_NOT_CHANGED;
break;
case 401:
domain = FLATPAK_HTTP_ERROR;
code = FLATPAK_HTTP_ERROR_UNAUTHORIZED;
break;
case 403:
case 404:
case 410: