Project

General

Profile

« Previous | Next » 

Revision 9333

use request query string first when handling MN.query() method. https://redmine.dataone.org/issues/7384

View differences:

MNResourceHandler.java
363 363
		                engine = decode(engine);
364 364
		                logMetacat.debug("query engine: " + engine);
365 365
		                
366
		                // get the query if it is there
367
		                query = extra.substring(engineIndex, extra.length());
366
		                // check the query string first
367
		                query = request.getQueryString();
368
		                
369
		                // if null, look at the whole endpoint
370
		                if (query == null) {
371
			                // get the query if it is there
372
			                query = extra.substring(engineIndex, extra.length());
373
			                if (query != null && query.length() == 0) {
374
			                	query = null;
375
			                } else {
376
			                	if (query.startsWith("/")) {
377
			                		query = query.substring(1);
378
			                    }
379
			                }
380
		                }
368 381
		                query = decode(query);
369
		                if (query != null && query.length() == 0) {
370
		                	query = null;
371
		                } else {
372
		                	if (query.startsWith("/")) {
373
		                		query = query.substring(1);
374
		                    }
375
		                	// remove the query delimiter if it exists
376
		                	if (query.startsWith("?")) {
377
		                		query = query.substring(1);
378
		                    }
379
		                }
380 382
		                logMetacat.debug("query: " + query);
381 383

  
382 384
	                }

Also available in: Unified diff