articulate / paperplane

Lighter-than-air node.js server framework
MIT License
134 stars 11 forks source link

Don't explode when content-type missing #29

Closed flintinatux closed 6 years ago

flintinatux commented 6 years ago

dilbert explode

Discovered recently that a certain CLI tool doesn't send content-type headers. Perhaps if all requests are always JSON, then you can save some bits by not specifying content-type: application/json every time. Whatevs. That's silly.

Regardless, paperplane shouldn't care if you're a negligent engineer. This PR catches those nasty errors and assumes your body encoding is utf8, which was our default before anyways.

flintinatux commented 6 years ago

squirrel typing