Summary
The UFSD error code → HTTP status mapping in ussapi.c currently uses workaround codes because HTTPD's httpresp() does not support 409, 414, and 507. Once mvslovers/httpd#28 is resolved, restore the semantically correct mappings.
Changes needed
In ufsd_rc_to_http() in src/ussapi.c:
| UFSD RC |
Current (workaround) |
Correct |
UFSD_RC_EXIST (32) |
400 |
409 Conflict |
UFSD_RC_NOTEMPTY (60) |
400 |
409 Conflict |
UFSD_RC_NAMETOOLONG (64) |
400 |
414 URI Too Long |
UFSD_RC_NOSPACE (44) |
500 |
507 Insufficient Storage |
UFSD_RC_NOINODES (48) |
500 |
507 Insufficient Storage |
Also update the duplicate-detection responses in ussCreateHandler (and future ussDeleteHandler) from 400 back to 409.
Update test expectations in tests/curl-uss.sh accordingly.
Depends on