Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
*/
public class QueueItem
{
final static private String key = "Location";
final static private String key = "location";
final static private String keyCs = "Location";

@Nonnull
private final String location;
Expand All @@ -25,9 +26,14 @@ public class QueueItem

public QueueItem(@Nonnull Map<String,List<String>> header) throws AbortException
{
if (!header.containsKey(key))
throw new AbortException(String.format("Error triggering the remote job. The header of the response has an unexpected format: %n%s", header));
location = header.get(key).get(0);
if (!header.containsKey(key)) {
if (!header.containsKey(keyCs))
throw new AbortException(String.format("Error triggering the remote job. The header of the response has an unexpected format: %n%s", header));
location = header.get(keyCs).get(0);
} else {
location = header.get(key).get(0);
}

try {
String loc = location.substring(0, location.lastIndexOf('/'));
id = loc.substring(loc.lastIndexOf('/')+1);
Expand Down