In _hlua_http_msg_dup(), we must always return nil if no data was
duplicated. The fact the end of the message was reached or not should not
interfere. So let's remove the extra condition on HTX_FL_EOM flag and always
return nil if no data was duplicated.
This patch could be backported to all supported versions.
break;
default:
- if (!ret)
- goto no_data;
goto end;
}
offset = 0;
}
-end:
- if (!ret && (htx->flags & HTX_FL_EOM))
+ end:
+ if (!ret)
goto no_data;
luaL_pushresult(&b);
return ret;