@@ -150,16 +150,6 @@ public X509Certificate[] getAcceptedIssuers() {
150150
151151 List <Test > tests = new ArrayList ();
152152
153- for (String objectType : objectTypes ) {
154- ObjectClass oc = s .getObjectClass (objectType );
155- if ((oc != null )
156- && (!s .getObjectClass (objectType ).isSupported ())) {
157- tests .add (new net .apnic .rdap .conformance .test .common .NotFound (
158- "/" + objectType )
159- );
160- }
161- }
162-
163153 /* Relative URI in the HTTP request. */
164154 Result relative = new Result ();
165155 relative .setTestName ("common.bad-uri-relative" );
@@ -195,6 +185,9 @@ public X509Certificate[] getAcceptedIssuers() {
195185 )
196186 );
197187
188+ /* From here onwards, the tests are RDAP-specific, except for
189+ * the unescaped-URI IP test. */
190+
198191 /* application/json content-type. This is deliberately using
199192 * an invalid status code with inverted sense, because so long
200193 * as the request is 'successful', it's fine. */
@@ -212,6 +205,26 @@ public X509Certificate[] getAcceptedIssuers() {
212205 ));
213206 c .setContentType (null );
214207
208+ /* Unsupported query types. */
209+ for (String objectType : objectTypes ) {
210+ Result unsupported = new Result ();
211+ unsupported .setTestName ("common.unsupported" );
212+ unsupported .setDocument ("draft-ietf-weirds-using-http-08" );
213+ unsupported .setReference ("5.4" );
214+ ObjectClass oc = s .getObjectClass (objectType );
215+ if ((oc == null )
216+ || (!s .getObjectClass (objectType ).isSupported ())) {
217+ tests .add (
218+ new net .apnic .rdap .conformance .test .common .BasicRequest (
219+ HttpStatus .SC_BAD_REQUEST ,
220+ "/" + objectType + "/1.2.3.4" ,
221+ "common.unsupported" ,
222+ false ,
223+ unsupported
224+ ));
225+ }
226+ }
227+
215228 ObjectClass ocIp = s .getObjectClass ("ip" );
216229 if ((ocIp != null ) && (ocIp .isSupported ())) {
217230 tests .add (new net .apnic .rdap .conformance .test .ip .BadRequest ());
0 commit comments