Browse files

punty case to handle a text/xml (xmlrpc) request. Requires an xml var…

…iable to be defined in the entry point
  • Loading branch information...
1 parent e400f90 commit 581589fc4c22b8a4f8ae29424cd0495c679f1868 @erikg committed Nov 10, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/backend/common.lisp
@@ -269,6 +269,11 @@ exists), otherwise returns NIL."
;; TODO DOS prevention: add support for rfc2388-binary to limit parsing length if the ContentLength header is fake, pass in *request-content-length-limit*
(return-from parse-request-body
(rfc2388-binary:read-mime stream boundary #'rfc2388-callback))))
+ ("text/xml"
+ (let ((buffer (make-array content-length :element-type '(unsigned-byte 8))))
+ (read-sequence buffer stream)
+ (return-from parse-request-body
+ (list (list "xml" (octets-to-string buffer :iso-8859-1))))))
(t (abort-backend-request "Invalid request content type"))))))))
(ucw.backend.debug "Skipped parsing request body, raw Content-Type is [~S], raw Content-Length is [~S]"
raw-content-type raw-content-length)

0 comments on commit 581589f

Please sign in to comment.