Altough the main clause is future, ...
... the presence of such temporal conjunctions as when, until, as soon as, before, after, while is enough to indicate futurity, and such clauses remain in the Present Simple or Present Perfect. If it is important to show that the first action will be completed before the second action begins, the present perfect is used. Will can be used after if in polite request, indirect and direct questions.