ngrunwald / ring-middleware-format

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

Pass a nil body through unchanged #40

Closed hlship closed 9 years ago

hlship commented 9 years ago

As per issue https://github.com/ngrunwald/ring-middleware-format/issues/39, a nil body is converted to "null" (for JSON) or "nil" (for EDN). This patch recognizes that situation and effectively leaves the body as nil, but updates the content-type and content-length headers.

joelittlejohn commented 9 years ago

Good stuff. It may be worth squashing these commits before they make it into the upstream log.

joelittlejohn commented 9 years ago

Ah, looks like this has already been tackled in #28 (Sept 2014).

minimal commented 9 years ago

I would use this fork where it is already fixed https://github.com/metosin/ring-middleware-format see #36

ngrunwald commented 9 years ago

Thanks, squashed and merged!