correctly manage http path