Author: ron.sigal(a)jboss.com
Date: 2008-05-13 00:53:06 -0400 (Tue, 13 May 2008)
New Revision: 4176
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
Log:
JBREM-978: Moved several socket related calls to SecurityUtility.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java 2008-05-13
04:51:44 UTC (rev 4175)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java 2008-05-13
04:53:06 UTC (rev 4176)
@@ -320,12 +320,12 @@
conn.setDoInput(true);
conn.setRequestMethod(type);
- OutputStream stream = conn.getOutputStream();
+ OutputStream stream = SecurityUtility.getOutputStream(conn);
if (marshaller instanceof VersionedMarshaller)
((VersionedMarshaller) marshaller).write(invocation, stream,
getVersion());
else
marshaller.write(invocation, stream);
- responseCode = conn.getResponseCode();
+ responseCode = SecurityUtility.getResponseCode(conn);
InputStream is = (responseCode < 400) ? conn.getInputStream() :
conn.getErrorStream();
Map headers = conn.getHeaderFields();
if (metadata == null)
@@ -359,9 +359,9 @@
conn.setDoInput(true);
conn.setRequestMethod(type);
- conn.connect();
+ SecurityUtility.connect(conn);
- InputStream is = (conn.getResponseCode() < 400) ? conn.getInputStream() :
conn.getErrorStream();
+ InputStream is = (SecurityUtility.getResponseCode(conn) < 400) ?
conn.getInputStream() : conn.getErrorStream();
Map headers = conn.getHeaderFields();
result = readResponse(null, headers, unmarshaller, is);
@@ -372,7 +372,7 @@
}
metadata.putAll(headers);
metadata.put(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE,
conn.getResponseMessage());
- responseCode = conn.getResponseCode();
+ responseCode = SecurityUtility.getResponseCode(conn);
metadata.put(HTTPMetadataConstants.RESPONSE_CODE, new
Integer(responseCode));
metadata.put(HTTPMetadataConstants.RESPONSE_HEADERS,
conn.getHeaderFields());
}
@@ -465,7 +465,7 @@
conn.setRequestProperty(HTTPMetadataConstants.REMOTING_USER_AGENT,
"JBossRemoting - " + Version.VERSION);
conn.setRequestProperty(HTTPMetadataConstants.REMOTING_LEASE_QUERY,
"true");
conn.setRequestProperty("sessionId", request.getSessionId());
- conn.connect();
+ SecurityUtility.connect(conn);
//InputStream is = (conn.getResponseCode() < 400) ?
conn.getInputStream() : conn.getErrorStream();
Map headers = conn.getHeaderFields();
Show replies by date