KaneCheshire / Peasy

A pure Swift mock server for embedding and running directly within iOS/macOS UI tests. Easy peasy.
MIT License
38 stars 10 forks source link

Requests will fail to parse if header end indicator is split over two events #16

Closed KaneCheshire closed 4 years ago

KaneCheshire commented 4 years ago

Currently the parser expects the double line break that indicates the header section is complete is sent in one chunk of data, so if it happens to have been chunked so the line break is split over two chunks the parsing will fail.

It’s unlikely to happen but possible and would be one of those things that’s super hard to debug when tests randomly fail using Peasy.

Luckily it’s easy to add unit tests to cover this.