HTTP response code 304 will never have an entity body.

Issue #11 resolved
Ben Slavin
created an issue

According to RFC 2068 (10.3.5), //"[A 304 Not Modified] response MUST NOT contain a message-body."//

RFC 2616 (10.3.5) agrees, stating that //"The 304 response MUST NOT contain a message-body, and thus is always terminated by the first empty line after the header fields."//

Currently, lhttpc_client expects an entity body for a 304 response.

Support is already included to properly handle 204, so the only change that needs to be made is an additional clause for lhttpc_client:has_body.

The patch is trivial, but I've attached it nonetheless.

Comments (6)

  1. Anonymous

    And that was me...

    Anyway, my proposal is to create a new test case that provokes the error and fix it in a fork. Regardless we'll fix it soon in this repo.

    Thanks!

  2. Log in to comment