Issue222

Closes #222 

Unfortunately I've had to disable the integration tests for now, since they're breaking with the correct status being returned now. Hopefully it won't be too much effort to get them working again.

@rcrichton if you could please review?