Skip to content

Commit

Permalink
* src/basic.c (mkcol_with_body, mkcol_again): Update error messages
Browse files Browse the repository at this point in the history
  from RFC 2518 to 4918; no functional change.
  • Loading branch information
notroj committed Sep 29, 2024
1 parent 0de2ef4 commit f41548c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,13 @@ static int mkcol_again(void)
{
PRECOND(coll_uri);

ONN("MKCOL on existing collection should fail (RFC2518:8.3.1)",
ne_mkcol(i_session, coll_uri) != NE_ERROR);
ONV(ne_mkcol(i_session, coll_uri) != NE_ERROR,
("MKCOL on existing collection should fail (RFC4918:S9.1), got: %s",
ne_get_error(i_session)));

if (STATUS(405)) {
t_warning("MKCOL on existing collection gave %d, should be 405 (RFC2518:8.3.2)",
GETSTATUS);
t_warning("MKCOL on existing collection gave %d, should be "
"405 (RFC4918:S9.3.2)", GETSTATUS);
}

return OK;
Expand Down Expand Up @@ -364,12 +365,10 @@ static int mkcol_with_body(void)
ONV(ne_request_dispatch(req),
("MKCOL on `%s' with (invalid) body: %s", uri,
ne_get_error(i_session)));

ONN("MKCOL with weird body must fail (RFC2518:8.3.1)",
ne_get_status(req)->klass == 2);

ONN("MKCOL with weird body must fail with 415 (RFC2518:8.3.1)",
ne_get_status(req)->code != 415);

ONV(ne_get_status(req)->code != 415,
("MKCOL with weird body must fail, got %d [RFC4918:S9.3)",
ne_get_status(req)->code));

ne_request_destroy(req);

Expand Down

0 comments on commit f41548c

Please sign in to comment.