Thanks for the logs. As you can see, nginx responds to the PROPFIND request that should list all contacts in the address book with this header:
I didn’t count the bytes of the response body, but the Apache HTTP client library which is used by DAVdroid thinks that only 16171 bytes have been received, although it should be 65676 as announced:
Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 65676; received: 16171)
So it thinks the response has been cut off and is thus incomplete and not valid, and it throws an exception, which is correctly interpreted as invalid DAV response by DAVdroid.
DAVdroid disables compression when you take logs, so HTTP compression is not a possible explanation (the logs wouldn’t be readable when compression is active).
So first we’d have to find out how large the response really is (16171 or 65676 bytes), then we know where the problem is: either on server side or in the Apache HTTP client library.