It appears that certain headers, including Content-Type, are subject to undocumented complications when one attempts to modify them. For example, the following backend configuration resulted in an empty Content-Type header being sent to the backend. Reversing the order of the two modifiers fixed this. My assumption is that attempts to alter the Content-Type header are tested for validity against the current body. So, the body must first be changed to something valid for the future Content-Type. This left me wondering if there are other such complications, and how users can discern them.
It appears that certain headers, including Content-Type, are subject to undocumented complications when one attempts to modify them. For example, the following backend configuration resulted in an empty Content-Type header being sent to the backend. Reversing the order of the two modifiers fixed this. My assumption is that attempts to alter the Content-Type header are tested for validity against the current body. So, the body must first be changed to something valid for the future Content-Type. This left me wondering if there are other such complications, and how users can discern them.