fix temp dir for ssl connections
strip headers