You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/09/10 16:22:47 UTC

svn commit: r1382869 - /jena/Experimental/riot-reader/src/main/java/riot_reader/HttpOp2.java

Author: andy
Date: Mon Sep 10 14:22:47 2012
New Revision: 1382869

URL: http://svn.apache.org/viewvc?rev=1382869&view=rev
Log:
Handle 404 consistently (for the framework).

Modified:
    jena/Experimental/riot-reader/src/main/java/riot_reader/HttpOp2.java

Modified: jena/Experimental/riot-reader/src/main/java/riot_reader/HttpOp2.java
URL: http://svn.apache.org/viewvc/jena/Experimental/riot-reader/src/main/java/riot_reader/HttpOp2.java?rev=1382869&r1=1382868&r2=1382869&view=diff
==============================================================================
--- jena/Experimental/riot-reader/src/main/java/riot_reader/HttpOp2.java (original)
+++ jena/Experimental/riot-reader/src/main/java/riot_reader/HttpOp2.java Mon Sep 10 14:22:47 2012
@@ -59,7 +59,7 @@ public class HttpOp2
             
             // Response
             StatusLine statusLine = response.getStatusLine() ;
-            if ( statusLine.getStatusCode() >= 404 )
+            if ( statusLine.getStatusCode() == 404 )
             {
                 WebReader2.log.debug(format("[%d] %s %s",id, statusLine.getStatusCode(), statusLine.getReasonPhrase())) ;
                 return null ;
@@ -73,7 +73,10 @@ public class HttpOp2
             HttpEntity entity = response.getEntity() ;
             if ( entity == null )
             {
-                
+                // No content in the return.  Probably a mistake, but not guaranteed.
+                if ( WebReader2.log.isDebugEnabled() )
+                    WebReader2.log.debug(format("[%d] %d %s :: (empty)",id, statusLine.getStatusCode(), statusLine.getReasonPhrase())) ;
+                return null ;
             }
                 
             MediaType mt = MediaType.create(entity.getContentType().getValue()) ;