change url parsing for s3_endpoint & add support for  syntax