REFACTOR: httpSetPlatform

Split into httpSetPlatformDir and httpSetPlatform.