missed this file in the last commit
fix a bug that not accounting the header size when deciding if there is enough data to read or not