DoMethodRequest method = (DoMethodRequest)command;
URI uri = method.getURI();
URL url = getURL(uri);
if (command instanceof DoPostRequest)
{
DoPostRequest doPostCmd = (DoPostRequest)command;
PostMethod post = null;
try
{
post = new PostMethod(url.toString());
post.setFollowRedirects(false);
Body body = doPostCmd.getBody();
if (doPostCmd.getContentType() != null)
{
post.addRequestHeader("Content-Type", doPostCmd.getContentType());
}
if (body instanceof Body.Raw)
{
Body.Raw rb = (Body.Raw)body;
ByteArrayRequestEntity entity = new ByteArrayRequestEntity(rb.getBytes());