This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5799 - HTTP_RESPONSE-1 returned twice on unknown domain names
Summary: HTTP_RESPONSE-1 returned twice on unknown domain names
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 minor
Target Milestone: ---
Assignee: Abel Rionda
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-25 09:25 UTC by fd
Modified: 2008-06-25 11:06 UTC (History)
0 users

See Also:


Attachments

Description fd 2008-06-25 09:25:25 UTC
Running the checker on an unknown domain name such as:
 http://idontexistatall.org
...yields to the following result where HTTP_RESPONSE-1 is returned twice for some reason:

<?xml version="1.0" encoding="UTF-8"?>
<tests outcome="FAIL">
   <test name="MAIN_DOCUMENT" outcome="FAIL">
      <result name="HTTP_RESPONSE-1" outcome="FAIL">
         <info>FAIL: The request to the resource http://idontexistatall.org does not result in a valid HTTP response (because of network-level error, DNS resolution error, or non-HTTP response) </info>
      </result>
      <result name="HTTP_RESPONSE-1" outcome="FAIL"/>
   </test>
</tests>

The incriminated code is in the MainDocumentTest class, where the second HTTP_RESPONSE-1 result is being added. The comment there states "This is hard to add any other way".

The test condition that triggers the addition of the second HTTP_RESPONSE-1 is:
 if (results.getSaxonMokiDocument() == null ||
   results.getPrimaryDocument().getBody() == null)
In my case, the moki document is not null, and there's indeed no body to the primary document since it cannot be retrieved.

I think the whole thing was a needed hack that is no longer needed. I guess it's harmless and safer to keep the condition on the moki document being null, but don't see why we need the second test in there.
Comment 1 Abel Rionda 2008-06-25 11:06:16 UTC
>I think the whole thing was a needed hack that is no longer needed

Yes, We think that it was need at some point but now it is meaningless.
We can close it.