izqui / Taylor

A lightweight library for writing HTTP web servers with Swift
MIT License
926 stars 79 forks source link

Fix issue where Request body was sometimes incorrectly empty #18

Closed kevinup7 closed 8 years ago

kevinup7 commented 8 years ago

Fixes issue discussed in #2

In order to handle this case when using GCDAsyncSocket, I needed to split the initialization process for requests into two parts, which meant the receivedDataCallback also needed to change. This feels like a better approach anyway, as the request headers need to be parsed first in order to determine the formatting and size of the request body (especially to handle more complex situations).