parent
94e2b9e66e
commit
fe02b3f8d3
1 changed files with 11 additions and 1 deletions
|
@ -48,14 +48,24 @@ public class IncomingLegacyMmsConnection extends LegacyMmsConnection implements
|
|||
}
|
||||
|
||||
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()) {
|
||||
request.addHeader(header);
|
||||
}
|
||||
|
||||
if (useProxy) {
|
||||
HttpHost proxy = new HttpHost(contentApn.getProxy(), contentApn.getPort());
|
||||
request.setConfig(RequestConfig.custom().setProxy(proxy).build());
|
||||
}
|
||||
|
||||
return request;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue