Merge pull request #5935 from ctiller/status_codes

Fix some status codes to match spec