                        :path patch
                        :trace (p/trace? trace? ctx)
                        :options (or allow-origin)
-                       nil)
-                     )
+                       nil))
                   (do
                     (warnf "Method not allowed %s" method)
                     (d/error-deferred

                     (rep/content-type-default state)))
               content-length (rep/content-length state)]

           (d/chain

            ;; Determine body
            (cond
              body (p/body body ctx)
              state state         ; the state here can still be deferred
              )

            ;; serialize to representation (an existing string will be left intact)
            (fn [state]
              (rep/content state content-type))

            ;; on nil, compose default result (if in dev)
            #_(fn [x] (if x x (rep/content nil content-type)))

            (fn [body]
              (if (not= method :head)
                (assoc-in ctx [:response :body] body)
                ctx))

            (fn [ctx]
              (if content-type
                (update-in ctx [:response :headers] assoc "content-type" content-type)
                ctx
                ))

            (fn [ctx]
              (if content-length
                (update-in ctx [:response :headers] assoc "content-length" content-length)
                ctx
                ))))))

      :post
      (d/chain

                            [:body
                             [:h1 "Internal Server Error"]
                             [:p (str %)]
                             [:pre (with-out-str (apply str (interpose "\n" (seq (.getStackTrace %)))))]])}))))))))

(defn yada [& args]
  (if (keyword? (first args))
