I am closing this out as it was an issue with the keyboard-chair interface. The curl commands were hitting different paths on the upstream which were returning different response types. Nginx is doing nothing wrong.