Skip to content

Commit

Permalink
Merge pull request #23 from gillesdubois/Fix22
Browse files Browse the repository at this point in the history
Fix22
  • Loading branch information
RudyLaurent authored Nov 10, 2017
2 parents 3de7617 + fbeac15 commit c460bac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions app/src/main/java/org/ocs/android/actions/OCSProtocol.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import android.content.Context;
import android.os.AsyncTask;
import android.text.TextUtils;

import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
Expand Down Expand Up @@ -191,9 +192,13 @@ public String sendmethod(File pFile, String server, boolean gziped) throws OCSPr
DefaultHttpClient httpClient = getNewHttpClient(OCSSettings.getInstance().isSSLStrict());

if (ocssettings.isProxy()) {
ocslog.debug("Use proxy : " + ocssettings.getProxyAdr());
HttpHost proxy = new HttpHost(ocssettings.getProxyAdr(), ocssettings.getProxyPort());
httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
if(!TextUtils.isEmpty(ocssettings.getProxyAdr())){
ocslog.debug("Use proxy : " + ocssettings.getProxyAdr());
HttpHost proxy = new HttpHost(ocssettings.getProxyAdr(), ocssettings.getProxyPort());
httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
}else{
ocslog.debug("Invalid proxy settings");
}
}
if (ocssettings.isAuth()) {
ocslog.debug("Use AUTH : " + ocssettings.getLogin() + "/*****");
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings_nt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
<string name="pref_default_cachelen" translatable="false">900000</string>

<string name="comp_useragent" translatable="false">OCS-NG_Android_agent_v2.0</string>
<string name="useragent" translatable="false">OCS-NG_Android_agent_v2.3</string>
<string name="useragent" translatable="false">OCS-NG_Android_agent_v2.3.1</string>
<string name="point" translatable="false">.</string>
</resources>

0 comments on commit c460bac

Please sign in to comment.