Skip to content

Commit

Permalink
Issue #1627 - treat HEAD same as GET
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Schroeder <mschroed@us.ibm.com>
  • Loading branch information
michaelwschroeder committed May 10, 2021
1 parent db38cfb commit 0488fe7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1659,15 +1659,15 @@ private List<Entry> processEntriesByMethod(Bundle requestBundle, Map<Integer, En
}

// If we're working on a 'transaction' type interaction, or an interaction
// where we're processing only GET requests, then start a new transaction now.
// where we're processing only GET or HEAD requests, then start a new transaction now.
BundleType.Value bundleType = requestBundle.getType().getValueAsEnum();
if (bundleType == BundleType.Value.TRANSACTION ||
(!requestEntriesByMethod.get(HTTPVerb.Value.GET).isEmpty() &&
((!requestEntriesByMethod.get(HTTPVerb.Value.GET).isEmpty() ||
!requestEntriesByMethod.get(HTTPVerb.Value.HEAD).isEmpty()) &&
requestEntriesByMethod.get(HTTPVerb.Value.DELETE).isEmpty() &&
requestEntriesByMethod.get(HTTPVerb.Value.POST).isEmpty() &&
requestEntriesByMethod.get(HTTPVerb.Value.PUT).isEmpty() &&
requestEntriesByMethod.get(HTTPVerb.Value.PATCH).isEmpty() &&
requestEntriesByMethod.get(HTTPVerb.Value.HEAD).isEmpty())) {
requestEntriesByMethod.get(HTTPVerb.Value.PATCH).isEmpty())) {
txn = new FHIRTransactionHelper(getTransaction());
txn.begin();
if (log.isLoggable(Level.FINE)) {
Expand Down

0 comments on commit 0488fe7

Please sign in to comment.