From 4c581f85e58f4f884f3eca32e0ae4ab33a6031b9 Mon Sep 17 00:00:00 2001
From: komakkar <komakkar@microsoft.com>
Date: Wed, 4 Nov 2020 17:14:38 +0530
Subject: [PATCH] not checking fo get requests

---
 .../notification/di/CredentialHeadersProvider.java     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/di/CredentialHeadersProvider.java b/notification-core/src/main/java/org/opengroup/osdu/notification/di/CredentialHeadersProvider.java
index 7ee884e2f..30252493e 100644
--- a/notification-core/src/main/java/org/opengroup/osdu/notification/di/CredentialHeadersProvider.java
+++ b/notification-core/src/main/java/org/opengroup/osdu/notification/di/CredentialHeadersProvider.java
@@ -52,17 +52,17 @@ public class CredentialHeadersProvider implements FactoryBean<DpsHeaders> {
     @Override
     public DpsHeaders getObject() throws Exception {
 
-        if(this.pubsubRequestBodyExtractor.isHandshakeRequest()) {
-            // The headers are not needed for the handshake requests.
-            return new DpsHeaders();
-        }
-
         RequestMethod requestMethod = RequestMethod.valueOf(httpRequest.getMethod());
 
         switch (requestMethod) {
             case POST:
             case PUT:
             case PATCH: {
+                if(this.pubsubRequestBodyExtractor.isHandshakeRequest()) {
+                    // The headers are not needed for the handshake requests.
+                    return new DpsHeaders();
+                }
+
                 Map<String, String> attributes = this.pubsubRequestBodyExtractor.extractAttributesFromRequestBody();
                 try {
                     //extract headers from pubsub message
-- 
GitLab