{
struct odes *o = obj_new(pool);
- if (buck_type < BUCKET_TYPE_V33)
+ if (buck_type == BUCKET_TYPE_PLAIN || buck_type == BUCKET_TYPE_V30)
{
if (!body_start) // header + body: ignore empty lines, read until EOF
{
*body_start = btell(body) - start;
}
}
- else
+ else if (buck_type == BUCKET_TYPE_V33 || buck_type == BUCKET_TYPE_V33_LIZARD)
{
/* Read all the bucket into 1 buffer, 0-copy if possible. */
int can_overwrite = bconfig(body, BCONFIG_CAN_OVERWRITE, -1);
* buck_type == BUCKET_TYPE_V33, then bflush(body) is needed before
* anything else than sequential read. */
}
+ else
+ RET_ERR(EINVAL);
return o;
}