Spring for Android
  1. Spring for Android
  2. ANDROID-72

Disable HttpURLConnection connection reuse on versions older than Froyo (Android 2.2)

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: 1.0.0.M4
    • Fix Version/s: 1.0.0.RC1
    • Component/s: rest-template
    • Labels:
      None

      Description

      From http://android-developers.blogspot.com/2011/09/androids-http-clients.html

      Prior to Froyo, HttpURLConnection had some frustrating bugs. In particular, calling close() on a readable InputStream could poison the connection pool.

      private void disableConnectionReuseIfNecessary() {
      // HTTP connection reuse which was buggy pre-froyo
      if (Integer.parseInt(Build.VERSION.SDK) < Build.VERSION_CODES.FROYO)

      { System.setProperty("http.keepAlive", "false"); }

      }

        Activity

        Roy Clarkson created issue -
        Roy Clarkson made changes -
        Field Original Value New Value
        Status To Do [ 10000 ] In Progress [ 3 ]
        Trevor Marshall made changes -
        Issue Type Story [ 8 ] New Feature [ 2 ]
        Workflow Scrum Workflow [ 51733 ] jira [ 51934 ]
        Trevor Marshall made changes -
        Workflow jira [ 51934 ] SPR Workflow [ 51978 ]
        Roy Clarkson made changes -
        Affects Version/s 1.0.0.M4 [ 12210 ]
        Component/s rest-template [ 11001 ]
        Assignee Roy Clarkson [ rclarkson ]
        Fix Version/s 1.0.0.RC1 [ 12334 ]
        Issue Type New Feature [ 2 ] Improvement [ 4 ]
        Priority Minor [ 4 ] Major [ 3 ]
        Hide
        Roy Clarkson added a comment - - edited

        Disabled connection reuse and "fixed length streaming mode" in SimpleStreamingClientHttpRequest for versions older than Froyo.

        Show
        Roy Clarkson added a comment - - edited Disabled connection reuse and "fixed length streaming mode" in SimpleStreamingClientHttpRequest for versions older than Froyo.
        Roy Clarkson made changes -
        Resolution Complete [ 8 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Roy Clarkson made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Trevor Marshall made changes -
        Workflow SPR Workflow [ 51978 ] ANDROID Workflow [ 98493 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        To Do To Do In Progress In Progress
        6m 56s 1 Roy Clarkson 30/Jan/12 11:12 AM
        In Progress In Progress Resolved Resolved
        22d 23h 27m 1 Roy Clarkson 22/Feb/12 10:39 AM
        Resolved Resolved Closed Closed
        11d 10h 21m 1 Roy Clarkson 04/Mar/12 9:01 PM

          People

          • Assignee:
            Roy Clarkson
            Reporter:
            Roy Clarkson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: