mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-03 19:25:39 +00:00
parent
94e2b9e66e
commit
fe02b3f8d3
@ -48,14 +48,24 @@ public class IncomingLegacyMmsConnection extends LegacyMmsConnection implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private HttpUriRequest constructRequest(Apn contentApn, boolean useProxy) throws IOException {
|
private HttpUriRequest constructRequest(Apn contentApn, boolean useProxy) throws IOException {
|
||||||
HttpGetHC4 request = new HttpGetHC4(contentApn.getMmsc());
|
HttpGetHC4 request;
|
||||||
|
|
||||||
|
try {
|
||||||
|
request = new HttpGetHC4(contentApn.getMmsc());
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
// #7339
|
||||||
|
throw new IOException(e);
|
||||||
|
}
|
||||||
|
|
||||||
for (Header header : getBaseHeaders()) {
|
for (Header header : getBaseHeaders()) {
|
||||||
request.addHeader(header);
|
request.addHeader(header);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (useProxy) {
|
if (useProxy) {
|
||||||
HttpHost proxy = new HttpHost(contentApn.getProxy(), contentApn.getPort());
|
HttpHost proxy = new HttpHost(contentApn.getProxy(), contentApn.getPort());
|
||||||
request.setConfig(RequestConfig.custom().setProxy(proxy).build());
|
request.setConfig(RequestConfig.custom().setProxy(proxy).build());
|
||||||
}
|
}
|
||||||
|
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user