y-polek / TransmissionRemote

Remote control for Transmission BitTorrent client
Apache License 2.0
167 stars 38 forks source link

Do not insert twice the `Content-Type` HTTP header #41

Closed aldur closed 8 years ago

aldur commented 8 years ago

A little back-story here. I noticed that TransmissionRemote was failing to connect to a Transmission server proxied behind a lighttpd instance. I investigated the problem and discovered that it was receiving a 400 Bad Request response to each request, because the Content-Type header was being set twice (to json and to application/json).

By reading the HTTP RFC it seems that it SHOULD be specified only once, so it seems reasonable to leave the application/json type.

y-polek commented 8 years ago

@aldur, thanks for the fix