spray/spray — pull request #111 by mfurtak (2012-05-12 19:04:25+00:00)
Title: Widening the definition of success in MessagePipelining response handling

Hello,

I have just started working with Scala, Akka, and Spray, and this is my first ever pull request. I hope you'll forgive me if things are a bit off, or I've omitted some important steps in the process. That said...

I was using spray-client to interact with a web service, but was having trouble getting the expected response data. The issue was that the web service was returning a 201 response code, but spray-client was considering this to be an unsuccessful response.

To fix this, I have altered the unmarshal method in MessagePipelining to use the isSuccess method of the StatusCode to decide whether the HttpResponse was successful. The existing code only accepted 200-OK as success and threw an UnsuccessfulResponseException for all other status codes. I also added to the MessagePipeliningSpec for testing.

Thanks for your consideration!

-Mike