Closed azuwis closed 6 years ago
@azuwis
Release #154 (version 4.5.6) should fix the issue.
Updated qBittorrent-Controller from Play Store to 4.5.7, and still see 400:
GET /json/events HTTP/1.1
Cookie:
Referer: http://<server>:<port>
Host: http://<server>:<port>
Connection: Keep-Alive
User-Agent: qBittorrent for Android
HTTP/1.1 400 Bad Request
Server: nginx/1.13.6
Date: Mon, 27 Nov 2017 02:46:22 GMT
Content-Type: text/html
Content-Length: 173
Connection: close
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.13.6</center>
</body>
</html>
A quick look at the code, and find httpget.setHeader("Host", this.protocol...
still exists in multiple places, e.g. here.
@azuwis thanks for pointed it out. I there's a new release #157 (version 4.5.8). Regards!
4.5.8 works, Thanks :)
Closing the issue.
You are welcome!
I've setup nginx to proxy https request to qbittorrent as suggested here and here.
While qbittorrent webui works fine using web browser(firefox or google chrome), qbittorrent-controller does not work with nginx proxy, but direct connect to qbittorrent works.
It turns out this commit introduced the problem.
According to RFC 2616,
Host:
should only contain host and port, but not protocol and others.Try making request with similar
Host:
to google.com, will get bad request too:Although direct connect to qbittorrent works, using nginx proxy give a much secure setup, please fix it.