Index: trunk/src/oauth/signpost/AbstractOAuthProvider.java
===================================================================
--- trunk/src/oauth/signpost/AbstractOAuthProvider.java	(revision 8149)
+++ trunk/src/oauth/signpost/AbstractOAuthProvider.java	(revision 9227)
@@ -12,4 +12,5 @@
 
 import java.io.BufferedReader;
+import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.util.HashMap;
@@ -28,5 +29,5 @@
  * you will probably inherit from this class, since it takes a lot of work from
  * you.
- * 
+ *
  * @author Matthias Kaeppler
  */
@@ -128,5 +129,5 @@
      * </ul>
      * </p>
-     * 
+     *
      * @param consumer
      *        the {@link OAuthConsumer} that should be used to sign the request
@@ -168,5 +169,5 @@
                 consumer.setAdditionalParameters(customOAuthParams);
             }
-            
+
             if (this.listener != null) {
                 this.listener.prepareRequest(request);
@@ -174,5 +175,5 @@
 
             consumer.sign(request);
-            
+
             if (this.listener != null) {
                 this.listener.prepareSubmission(request);
@@ -230,11 +231,14 @@
             return;
         }
-        BufferedReader reader = new BufferedReader(new InputStreamReader(response.getContent()));
         StringBuilder responseBody = new StringBuilder();
-
-        String line = reader.readLine();
-        while (line != null) {
-            responseBody.append(line);
-            line = reader.readLine();
+        InputStream content = response.getContent();
+        if (content != null) {
+            BufferedReader reader = new BufferedReader(new InputStreamReader(content));
+
+            String line = reader.readLine();
+            while (line != null) {
+                responseBody.append(line);
+                line = reader.readLine();
+            }
         }
 
@@ -251,5 +255,5 @@
      * Overrride this method if you want to customize the logic for building a
      * request object for the given endpoint URL.
-     * 
+     *
      * @param endpointUrl
      *        the URL to which the request will go
@@ -263,5 +267,5 @@
      * Override this method if you want to customize the logic for how the given
      * request is sent to the server.
-     * 
+     *
      * @param request
      *        the request to send
@@ -275,5 +279,5 @@
      * Called when the connection is being finalized after receiving the
      * response. Use this to do any cleanup / resource freeing.
-     * 
+     *
      * @param request
      *        the request that has been sent
@@ -295,5 +299,5 @@
      * token reply. You must call {@link #setResponseParameters} with the set of
      * parameters before using this method.
-     * 
+     *
      * @param key
      *        the parameter name
