Fixes issues with HEAD request in curl adapter