I used command-line with debug and proxy enable:
Code: Select all
https_proxy="https://localhost:8080" http_proxy="http://localhost:8080" transmission-remote 127.0.0.1 -b -c /opt/multimedia/incomplete --add "https://www.foo.com/torrents/download/?id=5703370" -w /mnt/videos/series/something --pex --dht
posting:
--------
{"arguments":{"incomplete-dir":"/opt/multimedia/incomplete","incomplete-dir-enabled":true},"method":"session-set"}
--------
* Couldn't find host 127.0.0.1 in the .netrc file; using defaults
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST http://127.0.0.1:9091/transmission/rpc/ HTTP/1.1
Host: 127.0.0.1:9091
User-Agent: transmission-remote/2.92 (14714)
Accept: */*
Accept-Encoding: deflate, gzip
Proxy-Connection: Keep-Alive
Content-Length: 115
Content-Type: application/x-www-form-urlencoded
* upload completely sent off: 115 out of 115 bytes
< HTTP/1.1 409 Conflict
< Server: Transmission
< X-Transmission-Session-Id: WP9Hba77pA1bi2Sv0UbNlQHbPMPuGmHBpArc15aa4l7QgM9w
< Date: Mon, 22 May 2017 18:06:03 GMT
< Content-Length: 580
< Content-Type: text/html; charset=ISO-8859-1
<
* Connection #0 to host localhost left intact
posting:
--------
{"arguments":{"incomplete-dir":"/opt/multimedia/incomplete","incomplete-dir-enabled":true},"method":"session-set"}
--------
* Couldn't find host 127.0.0.1 in the .netrc file; using defaults
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST http://127.0.0.1:9091/transmission/rpc/ HTTP/1.1
Host: 127.0.0.1:9091
User-Agent: transmission-remote/2.92 (14714)
Accept: */*
Accept-Encoding: deflate, gzip
Proxy-Connection: Keep-Alive
X-Transmission-Session-Id: WP9Hba77pA1bi2Sv0UbNlQHbPMPuGmHBpArc15aa4l7QgM9w
Content-Length: 115
Content-Type: application/x-www-form-urlencoded
* upload completely sent off: 115 out of 115 bytes
< HTTP/1.1 200 OK
< Server: Transmission
< Content-Encoding: gzip
< Content-Type: application/json; charset=UTF-8
< Date: Mon, 22 May 2017 18:06:03 GMT
< Content-Length: 56
<
* Connection #0 to host localhost left intact
got response (len 36):
--------
{"arguments":{},"result":"success"}
--------
127.0.0.1:9091/transmission/rpc/ responded: "success"
posting:
--------
{"arguments":{"download-dir":"/mnt/videos/series/something","filename":"https://www.foo.com/torrents/download/?id=5703370"},"method":"torrent-add","tag":8}
--------
* Couldn't find host 127.0.0.1 in the .netrc file; using defaults
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST http://127.0.0.1:9091/transmission/rpc/ HTTP/1.1
Host: 127.0.0.1:9091
User-Agent: transmission-remote/2.92 (14714)
Accept: */*
Accept-Encoding: deflate, gzip
Proxy-Connection: Keep-Alive
X-Transmission-Session-Id: WP9Hba77pA1bi2Sv0UbNlQHbPMPuGmHBpArc15aa4l7QgM9w
Content-Length: 161
Content-Type: application/x-www-form-urlencoded
* upload completely sent off: 161 out of 161 bytes
< HTTP/1.1 200 OK
< Server: Transmission
< Content-Encoding: gzip
< Content-Type: application/json; charset=UTF-8
< Date: Mon, 22 May 2017 18:06:03 GMT
< Content-Length: 85
<
* Connection #0 to host localhost left intact
got response (len 68):
--------
{"arguments":{},"result":"invalid or corrupt torrent file","tag":8}
--------
Error: invalid or corrupt torrent file
posting:
--------
{"arguments":{"dht-enabled":true,"pex-enabled":true},"method":"session-set"}
--------
* Couldn't find host 127.0.0.1 in the .netrc file; using defaults
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST http://127.0.0.1:9091/transmission/rpc/ HTTP/1.1
Host: 127.0.0.1:9091
User-Agent: transmission-remote/2.92 (14714)
Accept: */*
Accept-Encoding: deflate, gzip
Proxy-Connection: Keep-Alive
X-Transmission-Session-Id: WP9Hba77pA1bi2Sv0UbNlQHbPMPuGmHBpArc15aa4l7QgM9w
Content-Length: 77
Content-Type: application/x-www-form-urlencoded
* upload completely sent off: 77 out of 77 bytes
< HTTP/1.1 200 OK
< Server: Transmission
< Content-Encoding: gzip
< Content-Type: application/json; charset=UTF-8
< Date: Mon, 22 May 2017 18:06:03 GMT
< Content-Length: 56
<
* Connection #0 to host localhost left intact
got response (len 36):
--------
{"arguments":{},"result":"success"}
--------
127.0.0.1:9091/transmission/rpc/ responded: "success"
fgrep
Code: Select all
strace -s 1024 -f transmission-remote 127.0.0.1 -b -c /opt/multimedia/incomplete --add "https://www.foo.com/torrents/download/?id=5703370" -w /mnt/videos/series/something --pex --dht 2>&1 | fgrep http
execve("/usr/bin/transmission-remote", ["transmission-remote", "127.0.0.1", "-b", "-c", "/opt/multimedia/incomplete", "--add", "https://www.foo.com/torrents/download/?id=5703370", "-w", "/mnt/videos/series/something", "--pex", "--dht"], [/* 48 vars */]) = 0
recvfrom(3, "HTTP/1.1 409 Conflict\r\nServer: Transmission\r\nX-Transmission-Session-Id: dS9r8HR01JC0i6OgOxC7TDudLFV357P6c0W3jZOxn6fPPQHn\r\nDate: Mon, 22 May 2017 18:11:49 GMT\r\nContent-Length: 580\r\nContent-Type: text/html; charset=ISO-8859-1\r\n\r\n<h1>409: Conflict</h1><p>Your request had an invalid session-id header.</p><p>To fix this, follow these steps:<ol><li> When reading a response, get its X-Transmission-Session-Id header and remember it<li> Add the updated header to your outgoing requests<li> When you get this 409 error message, resend your request with the updated header</ol></p><p>This requirement has been added to help prevent <a href=\"http://en.wikipedia.org/wiki/Cross-site_request_forgery\">CSRF</a> attacks.</p><p><code>X-Transmission-Session-Id: dS9r8HR01JC0i6OgOxC7TDudLFV357P6c0W3jZOxn6fPPQHn</code></p>", 16384, 0, NULL, NULL) = 807
stat("https://www.foo.com/torrents/download/?id=5703370", 0x7fff8663a360) = -1 ENOENT (No such file or directory)
write(2, "posting:\n--------\n{\"arguments\":{\"download-dir\":\"/mnt/videos/series/something\",\"filename\":\"https://www.foo.com/torrents/download/?id=5703370\"},\"method\":\"torrent-add\",\"tag\":8}\n\n--------\n", 189posting:
{"arguments":{"download-dir":"/mnt/videos/series/something","filename":"https://www.foo.com/torrents/download/?id=5703370"},"method":"torrent-add","tag":8}
sendto(3, "POST /transmission/rpc/ HTTP/1.1\r\nHost: 127.0.0.1:9091\r\nUser-Agent: transmission-remote/2.92 (14714)\r\nAccept: */*\r\nAccept-Encoding: deflate, gzip\r\nX-Transmission-Session-Id: dS9r8HR01JC0i6OgOxC7TDudLFV357P6c0W3jZOxn6fPPQHn\r\nContent-Length: 161\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n{\"arguments\":{\"download-dir\":\"/mnt/videos/series/something\",\"filename\":\"https://www.foo.com/torrents/download/?id=5703370\"},\"method\":\"torrent-add\",\"tag\":8}\n", 466, MSG_NOSIGNAL, NULL, 0) = 466
I'm using GNU/Linux and transmission-remote/2.92.
Well everything seems fine in the dump so I really don't whats going on. With the debug output I forgot the proxy output but in this case the "=" characters has been changed to ":".
PS: its ok if the torrent is not downloaded I just want to test "=" ":" characters.