Revision 9333
Added by ben leinfelder about 9 years ago
src/edu/ucsb/nceas/metacat/restservice/v1/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 |
} |
src/edu/ucsb/nceas/metacat/restservice/v2/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
use request query string first when handling MN.query() method. https://redmine.dataone.org/issues/7384