In general the content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient, BUT in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET. So I have added a check that avoid to read the response body.
In general the content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient, BUT in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET. So I have added a check that avoid to read the response body.

dedalozzo/eoc-client