Fixes #4662: Response returning the wrong protocol

Please check if this is done right but this should fix the problem

Ticket: http://dev.kohanaframework.org/issues/4662