Long streams of data are divided into chunks or several data arrivals... so only first chunk of long stream will contain header and be processed, the rest will be ignored.

If each stream is transmitted on one connection that is closed when send is over then concatenate bytes in data arrivals and process when connection is closed (or stream is completed).