YodaDaCoda/chrome-transmission-remote-plus — pull request #5 by BakaMikaze (2014-05-14 22:34:23+00:00)
Title: Set POST authorization header beforehand to avoid a first 401 response 

This solves an issue I encountered using extension on my computer on same LAN as the server: nothing was working and parse exception was seen in log.

With previous method, I could see a first request without credential issued to the server, which replied with 401 error code, then only was the request which gave a 409 answer with X-Transmission-Session-Id.

With debuger, in complete function I could see header of the 401 answer (without X-Transmission-Session-Id) and body of the 409 answer. excption was from JSON.Parse of "

409..."

I don't really get why I had, this strange behavior of mixed answers, and this is not seen on WAN access,
but proposed fix avoid a first POST without credential and solves the issue.