parse curl response headers properly