<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Problem with HttpClient in latest firmware 9.2(3)</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=5334296" />
  <subtitle>Problem with HttpClient in latest firmware 9.2(3)</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=5334296</id>
  <updated>2013-05-26T01:26:45Z</updated>
  <dc:date>2013-05-26T01:26:45Z</dc:date>
  <entry>
    <title>RE: Problem with HttpClient in latest firmware 9.2(3)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5489460" />
    <author>
      <name>David Staudt</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5489460</id>
    <updated>2012-04-19T18:51:43Z</updated>
    <published>2012-04-19T18:51:43Z</published>
    <summary type="html">This issue looks to be resolved in the 9.2.4 release - targeted for 'middle of May' 2012</summary>
    <dc:creator>David Staudt</dc:creator>
    <dc:date>2012-04-19T18:51:43Z</dc:date>
  </entry>
  <entry>
    <title>RE: Problem with HttpClient in latest firmware 9.2(3)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5343130" />
    <author>
      <name>David Staudt</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5343130</id>
    <updated>2012-03-22T22:25:42Z</updated>
    <published>2012-03-22T22:25:42Z</published>
    <summary type="html">Looks like this is a change in behaviour and likely a defect.  Opened defect # CSCty84170 for tracking.</summary>
    <dc:creator>David Staudt</dc:creator>
    <dc:date>2012-03-22T22:25:42Z</dc:date>
  </entry>
  <entry>
    <title>RE: Problem with HttpClient in latest firmware 9.2(3)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5336588" />
    <author>
      <name>David Schlenk</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5336588</id>
    <updated>2012-03-21T19:52:28Z</updated>
    <published>2012-03-21T19:52:28Z</published>
    <summary type="html">[quote]Can you tell us the nature of the failure (stack trace?)  Do you see anything in logcat?  We have not heard of any issues heretofore but 9.2.3 was just released.[/quote]
 
The app is called MobileMiner. It's in AppHQ. I submitted a new version this morning with a workaround, but the version that is still available at this point (2.09) will exhibit this error. I haven't had reports from anyone using it on any other Android device, although the installed base is rather small. 
 
I get a NPE because I try to invoke a method on the HttpUriRequest object that I expect to be returned by HttpContext, but in fact I get a null pointer instead of the HttpUriRequest object. Basically, what I'm doing is creating a request, executing it, then attempting to retrieve the final URI used in the request after I get the response so that I properly follow redirects. The documentation for doing so does it exactly how I'm doing it, and it worked in all previous firmware versions, so I'm wondering if there might be an issue with the latest firmware's implementation of HttpClient. Here's the relevant documentation: 
 
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/httpagent.html#d5e1255

The method call to retrieve the actual host works, so in my hacked version I just parse the original URL from the request to get the relative portion of the URI and append it to the host portion of the URI. This works for probably most cases for my app, but it by no means is the right way to do it as a redirect could change the relative path along with the host. </summary>
    <dc:creator>David Schlenk</dc:creator>
    <dc:date>2012-03-21T19:52:28Z</dc:date>
  </entry>
  <entry>
    <title>RE: Problem with HttpClient in latest firmware 9.2(3)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5336507" />
    <author>
      <name>David Staudt</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5336507</id>
    <updated>2012-03-21T19:08:12Z</updated>
    <published>2012-03-21T19:08:12Z</published>
    <summary type="html">Can you tell us the nature of the failure (stack trace?)  Do you see anything in logcat?  We have not heard of any issues heretofore but 9.2.3 was just released.</summary>
    <dc:creator>David Staudt</dc:creator>
    <dc:date>2012-03-21T19:08:12Z</dc:date>
  </entry>
  <entry>
    <title>RE: Problem with HttpClient in latest firmware 9.2(3)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5334540" />
    <author>
      <name>Prem Bejjam</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5334540</id>
    <updated>2012-03-21T18:43:08Z</updated>
    <published>2012-03-21T18:43:08Z</published>
    <summary type="html">Hello David,

Can you please let us know what application you are facing an issue with?

Thank you,
Prem</summary>
    <dc:creator>Prem Bejjam</dc:creator>
    <dc:date>2012-03-21T18:43:08Z</dc:date>
  </entry>
  <entry>
    <title>Problem with HttpClient in latest firmware 9.2(3)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5334295" />
    <author>
      <name>David Schlenk</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5334295</id>
    <updated>2012-03-21T17:45:07Z</updated>
    <published>2012-03-21T17:45:07Z</published>
    <summary type="html">I've encountered an issue in my app in the latest firmware. Previous releases worked without issue. The relevant code is: 
 


HttpResponse response = httpClient.execute(request, localContext);
 
// currentReq is assigned null
HttpUriRequest currentReq = (HttpUriRequest) getLocalContext().getAttribute(ExecutionContext.HTTP_REQUEST);
 
// currentHost is assigned properly as always
HttpHost currentHost = (HttpHost)  getLocalContext().getAttribute(ExecutionContext.HTTP_TARGET_HOST);
 
I checked the Android API as well as stock HttpClient documentation and this should work. I can attempt to work around it, but wondered if anyone else has run into this with the latest firmware?
 </summary>
    <dc:creator>David Schlenk</dc:creator>
    <dc:date>2012-03-21T17:45:07Z</dc:date>
  </entry>
</feed>

