hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Troccola (JIRA)" <j...@apache.org>
Subject [jira] Created: (HTTPCLIENT-1064) ExecutionContext returning HttpUriRequest with invalid URI (missing host)
Date Sat, 26 Feb 2011 18:01:58 GMT
ExecutionContext returning HttpUriRequest with invalid URI (missing host)
-------------------------------------------------------------------------

                 Key: HTTPCLIENT-1064
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1064
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient
    Affects Versions: 4.1 Final
         Environment: Windows 7, java 1.6.0.21
            Reporter: Ted Troccola


The HttpUriRequest contains an invalid URI - host is null

public static void main(String args[]) throws ClientProtocolException, IOException
{
    HttpParams httpParams = new BasicHttpParams();
    HttpClient httpclient = new DefaultHttpClient(httpParams);
    HttpGet httpGet = new HttpGet("http://www.google.com/");
    HttpContext context = new BasicHttpContext();
    httpclient.execute(httpGet, context);
    HttpUriRequest currentReq = (HttpUriRequest) context.getAttribute(ExecutionContext.HTTP_REQUEST);
    System.out.println("New URI host (why is it null?): " + currentReq.getURI().getHost());
}


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message