Skip to content

Commit 5997be3

Browse files
committed
Header request
1 parent 7d1c312 commit 5997be3

File tree

1 file changed

+7
-4
lines changed
  • build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/artifactory

1 file changed

+7
-4
lines changed

build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/artifactory/ArtifactoryManager.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,18 @@ public DownloadResponse download(String downloadFrom, Map<String, String> header
9595

9696
/**
9797
* Download headers and return specific header if exists
98+
*
9899
* @param downloadFrom - path to specific artifact in Artifactory.
99-
* @param headerName - specific header name to return if exists.
100+
* @param headerName - specific header name to return if exists.
100101
* @return - header's string value to return.
101102
*/
102103
public String downloadHeader(String downloadFrom, String headerName) throws IOException {
103104
Header[] headers = downloadHeaders(downloadFrom);
104-
for (Header header : headers) {
105-
if (header.getName().equals(headerName)) {
106-
return header.getValue();
105+
if (headers != null) {
106+
for (Header header : headers) {
107+
if (header.getName().equals(headerName)) {
108+
return header.getValue();
109+
}
107110
}
108111
}
109112
return StringUtils.EMPTY;

0 commit comments

Comments
 (0)