Fix field-value checking to not throw for lone spaces

`setRequestHeader()` throws on header values that contain spaces, even though spaces are legal in header values.

This makes jQuery's `$.post` work.

Blocks #2282