Set up my own nix-serve instance, but "transfer closed with 1393048 bytes remaining to read"

I set up my own nix-serve instance and wrote a systemd unit for it. It “works” (signature-wise and all), but while downloading a package I get:

HTTP error 200 (curl error: Transferred a partial file); retrying in 669 ms

When I curl the package, I get:

curl: (18) transfer closed with 1393048 bytes remaining to read

What’s the matter here?

I replaced the daemon with nix-serve-ng and it’s working perfectly now.