net.aserve:request-query will ignore POST parameters if content-type is not equal to "application/x-www-form-urlencoded".
But if I set content-type on client [Firefox 3.0.6 using XMLHttpRequest()] with something like
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
the server will receive content-type = "application/x-www-form-urlencoded; charset=UTF-8".
To fix this quickly I replaced, in the definition of net.aserve:request-query, the test
(equal (header-slot-value req :content-type) "application/x-www-form-urlencoded")
by
(application/x-www-form-urlencoded? req)
where application/x-www-form-urlencoded? is defined as follows
(defun application/x-www-form-urlencoded? (req)
(let ((pos
(mismatch
(header-slot-value req :content-type)
"application/x-www-form-urlencoded"
:test #'char-equal)))
(or
(null pos)
(= pos #.(length "application/x-www-form-urlencoded")))))
I just found and fixed the exact same bug.
Is anybody maintaining this system? Does not seem very active.