ngrunwald / ring-middleware-format

Ring middleware for parsing parameters and emitting responses in JSON or other formats
163 stars 49 forks source link

do not serialize when entire response is nil #18

Closed ninjudd closed 11 years ago

ninjudd commented 11 years ago

It is my understanding that ring and compojure use a nil response to indicate that the request could not be handled, allowing multiple handlers to be chained together.

But wrap-restful-response prevents this by serializing the nil body in this case. What do think of checking if the entire response is nil in serializable? to fix this issue?

ninjudd commented 11 years ago

@ngrunwald, have you had a chance to look at this yet? I'm running off my own fork right now, but I'd prefer to switch back to the mainline release for the long term.

Thanks.

ngrunwald commented 11 years ago

Sorry for the delay, I had a lot on my plate lately. This seems perfectly reasonable to me. I'll cut a new release with this very soon.