yada

OliverM 2018-11-22T21:42:21.096100Z

Sometimes, when I return true from a database operation all the way back up to the yada PUT handler that invoked it, my auto-generated responses are chunked and don’t close. The headers are sent but then the response never completes:

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Server: Aleph/0.4.4
Connection: Keep-Alive
Date: Thu, 22 Nov 2018 21:38:18 GMT
transfer-encoding: chunked
If I return nil instead of true then the response completes:
HTTP/1.1 204 No Content
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Server: Aleph/0.4.4
Connection: Keep-Alive
Date: Thu, 22 Nov 2018 21:38:33 GMT
I thought returning true (or any non-nil content) from PUTs or POSTs signalled to yada that the action was successful, and that nil content should get translated into 404s… is that not the case for POSTs or PUTs?