fixed support for separating headers from body
changed exception messages
added getHeaders and getRawHeaders methods
updated tests