Replace headers variable with accept-headers

more accurate!
parent 7a715893
......@@ -103,15 +103,15 @@
(define (actor-profile req)
;; A very naive (and incorrect) version of header parsing.
;; A demo kludge for sure ;P
(define headers
(string-split (match (assoc 'accept (request-headers req))
(define accept-headers
(string-split (match (assoc 'accept (request-accept-headers req))
[(cons 'accept str) str]
[#f ""])
","))
(cond
;; If we get request for json-ld, return that
;; TODO: Accept other json-ld header here, and parse it right
[(member "application/activity+json" headers)
[(member "application/activity+json" accept-headers)
(define profile
`#hasheq((name . ,(users-name))
(inbox . ,(golem-absolute-url-str get-inbox))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment