http: Reorder two code blocks