Wed, 20 Apr 2016 14:08:00 +0200
added support for error codes 407,413,414 and 511
dav/error.c | file | annotate | diff | comparison | revisions | |
libidav/session.c | file | annotate | diff | comparison | revisions | |
libidav/webdav.h | file | annotate | diff | comparison | revisions |
--- a/dav/error.c Sun Apr 10 11:39:09 2016 +0200 +++ b/dav/error.c Wed Apr 20 14:08:00 2016 +0200 @@ -51,6 +51,14 @@ fprintf(stderr, "Authentication required.\n"); break; } + case DAV_PROXY_AUTH_REQUIRED: { + fprintf(stderr, "Proxy authentication required.\n"); + break; + } + case DAV_NET_AUTH_REQUIRED: { + fprintf(stderr, "Network authentication required.\n"); + break; + } case DAV_FORBIDDEN: { fprintf(stderr, "Access forbidden.\n"); break; @@ -109,6 +117,14 @@ res_url); break; } + case DAV_REQUEST_ENTITY_TOO_LARGE: { + fprintf(stderr, "Request entity too large.\n"); + break; + } + case DAV_REQUEST_URL_TOO_LONG: { + fprintf(stderr, "Request URL too long.\n"); + break; + } } free(res_url); }
--- a/libidav/session.c Sun Apr 10 11:39:09 2016 +0200 +++ b/libidav/session.c Wed Apr 20 14:08:00 2016 +0200 @@ -153,8 +153,12 @@ case 403: sn->error = DAV_FORBIDDEN; break; case 404: sn->error = DAV_NOT_FOUND; break; case 405: sn->error = DAV_METHOD_NOT_ALLOWED; break; + case 407: sn->error = DAV_PROXY_AUTH_REQUIRED; break; case 409: sn->error = DAV_CONFLICT; break; + case 413: sn->error = DAV_REQUEST_ENTITY_TOO_LARGE; break; + case 414: sn->error = DAV_REQUEST_URL_TOO_LONG; break; case 423: sn->error = DAV_LOCKED; break; + case 511: sn->error = DAV_NET_AUTH_REQUIRED; break; } } else { switch(c) {
--- a/libidav/webdav.h Sun Apr 10 11:39:09 2016 +0200 +++ b/libidav/webdav.h Wed Apr 20 14:08:00 2016 +0200 @@ -78,7 +78,11 @@ DAV_TIMEOUT, DAV_SSL_ERROR, DAV_QL_ERROR, - DAV_CONTENT_VERIFICATION_ERROR + DAV_CONTENT_VERIFICATION_ERROR, + DAV_REQUEST_ENTITY_TOO_LARGE, + DAV_REQUEST_URL_TOO_LONG, + DAV_PROXY_AUTH_REQUIRED, + DAV_NET_AUTH_REQUIRED }; typedef enum DavError DavError;