"The request sent by the client was syntactically incorrect." -- 错误的内容类型

"The request sent by the client was syntactically incorrect." -- bad Content-Type

在向 JAX-RS REST 服务器发送一些测试请求时,我收到了

400 - Bad Request
The request sent by the client was syntactically incorrect.

请求是

PUT http://localhost:8080/some/url
Content-Type: text-plain
foo
Content-Type: text-plain

是一个拼写错误和错误的 MIME 类型。应该是

Content-type: text/plain

有一段时间这有点让人头疼。