1
0
mirror of https://github.com/nerzhul/ownCloud-SMS-App.git synced 2026-08-22 22:03:10 +00:00

HTTPClient: send application name & version code in User Agent

Also ignore cookies like owncloud android lib & set http version to 1.1
This commit is contained in:
Loïc Blot
2017-01-20 11:35:11 +01:00
parent dccfee4377
commit 82d1de3463
5 changed files with 293 additions and 3 deletions
@@ -241,7 +241,7 @@ public class LoginActivity extends AppCompatActivity {
@Override
protected Boolean doInBackground(Void... params) {
_returnCode = 0;
OCHttpClient http = new OCHttpClient(_serverURI, _login, _password);
OCHttpClient http = new OCHttpClient(getBaseContext(), _serverURI, _login, _password);
GetMethod testMethod = http.getVersion();
try {
_returnCode = http.execute(testMethod);