Skip to content

Commit

Permalink
fix(body): XML includes the document-node
Browse files Browse the repository at this point in the history
Ensure items appearinge before and after the root element,
such as processing instructions or comments are preserved.
  • Loading branch information
line-o committed Nov 14, 2022
1 parent 0082a2c commit 21f2c6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/body.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ declare function body:parse ($request as map(*)) {
let $data := request:get-data()
return
typeswitch ($data)
case node() return $data/node()
case node() return $data
default return parse-xml($data)
(: Treat everything else as binary data :)
default return request:get-data()
Expand Down

0 comments on commit 21f2c6d

Please # to comment.