eXist-db/exist — pull request #428 by adamretter (2014-12-22 22:52:54+00:00)
Title: [bugfix] Avoid NPE in RESTXQ when extracting empty request body

Avoid an NPE in RESTXQ when there is no request body when using `%rest:POST` and/or `%rest:PUT` annotations to extract the body e.g.

```xquery
xquery version "3.0";

declare
%rest:GET
%rest:POST("{$body}")
%rest:PUT("{$body}")
%rest:DELETE
%rest:path("/empty-body")
function local:get($body) {

{$body}

};

()
```

```bash
curl -v -X POST http://admin:@localhost:8080/exist/restxq/empty-body
```