Revert "Revert "fixing http statuses""

This reverts commit 87aa248a655002ce6c676008ff2a79dfbf7fa2de.