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
385 385
		                engine = decode(engine);
386 386
		                logMetacat.debug("query engine: " + engine);
387 387
		                
388
		                // get the query if it is there
389
		                query = extra.substring(engineIndex, extra.length());
390
		                if (query != null && query.length() == 0) {
391
		                	query = null;
392
		                } else {
393
		                	if (query.startsWith("/")) {
394
		                		query = query.substring(1);
395
		                    }
396
		                	// remove the query delimiter if it exists
397
		                	if (query.startsWith("?")) {
398
		                		query = query.substring(1);
399
		                    }
388
		                // check the query string first
389
		                query = request.getQueryString();
390
		                
391
		                // if null, look at the whole endpoint
392
		                if (query == null) {
393
			                // get the query if it is there
394
			                query = extra.substring(engineIndex, extra.length());
395
			                if (query != null && query.length() == 0) {
396
			                	query = null;
397
			                } else {
398
			                	if (query.startsWith("/")) {
399
			                		query = query.substring(1);
400
			                    }
401
			                }
400 402
		                }
403
		                
401 404
		                query = decode(query);
402 405
		                logMetacat.debug("query: " + query);
403 406

  

Also available in: Unified diff