Commit 69edfa65 authored by Komal Makkar's avatar Komal Makkar
Browse files

minor changes

parent 83e7f9b9
Pipeline #13777 failed with stage
in 2 minutes and 1 second
......@@ -51,16 +51,18 @@ 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();
} else {
Map<String, String> attributes = this.pubsubRequestBodyExtractor.extractAttributesFromRequestBody();
try {
//extract headers from pubsub message
......@@ -72,7 +74,6 @@ public class CredentialHeadersProvider implements FactoryBean<DpsHeaders> {
throw new Exception("Failed to generate headers for register service.");
}
}
}
default: {
return new DpsHeaders();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment