gitsite: use portable HTTP request body API

ober

9a16735dedf4e1bf615fc1ed722cb1204384bc7b

diff --git a/src/gitsite/git_http.ss b/src/gitsite/git_http.ss
index 8559a09..514b428 100644
--- a/src/gitsite/git_http.ss
+++ b/src/gitsite/git_http.ss
@@ -170,13 +170,19 @@
        (if remote-user (str "REMOTE_USER='" remote-user "' ") "")
        "git http-backend < '" in-file "' > '" out-file "' 2>'" err-file "'"))
 
+(def (request-body-bytevector req)
+  (let ([body (http-req-body req)])
+    (cond
+      [(bytevector? body) body]
+      [(string? body) (string->utf8 body)]
+      [else (make-bytevector 0)])))
 (def (run-git-cgi user req repo owner name suffix)
   (def method (http-req-method req))
   (def query (sanitize-query (http-req-query req)))
   (def content-type (sanitize-content-type (http-req-header req "Content-Type")))
   (def remote-user (and (git-authorized? user req repo) owner))
   (def body-bv (if (string=? method "POST")
-                 (or (http-req-body-bv req) (make-bytevector 0))
+                 (request-body-bytevector req)
                  (make-bytevector 0)))
   (def tok (new-token))
   (def in-file (str "/tmp/gitsite-" tok ".in"))