ws: Don't assert when serving a zero length resource

An erroneous assertion did not take zero into account.

Closes #1249
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>