I want the code to: I have added use_module(library(http/http_log)). It is writing requests/responses to httpd.log file, but it is writing wrong status codes, it seems like all status codes are 200. When prolog is responding to a requests, it is explicitly setting status code in reply_json. The response should look something like this completed(8, 0.0014660000000000003, 139, 400, bad).
But what I’m getting is: Last line of httpd.log is: completed(8, 0.0014660000000000003, 139, 200, ok).
My code looks like this:
reply_json(ErrorOut, [status(400)])
My suspicion is that it is because I am explicitly setting status codes. Because in reality the code executes properly.
Yes (from swipl-devel.git), but be aware the the recent rational changes are quite massive and may cause some regression. Should be ok for development purposes but for deployment it may be better to cherry-pick the changes into a version that works for you.