/** * Generates a policy document condition statement to represent an * equality test. * * @param name * the name of the data item that will be tested. * @param values * a list of values, one of which must match the named data item. * @return * a condition statement that can be included in the policy document * belonging to an S3 POST form. */ public static String generatePostPolicyCondition_Equality(String name, String[] values) { return "{\"" + name + "\": \"" + ServiceUtils.join(values, ",") + "\"}"; }
/** * Generates a policy document condition statement to represent an * equality test. * * @param name * the name of the data item that will be tested. * @param values * a list of values, one of which must match the named data item. * @return * a condition statement that can be included in the policy document * belonging to an S3 POST form. */ public static String generatePostPolicyCondition_Equality(String name, List<String> values) { return "{\"" + name + "\": \"" + ServiceUtils.join(values, ",") + "\"}"; }
/** * Generates a policy document condition statement to represent an * equality test. * * @param name * the name of the data item that will be tested. * @param values * a list of values, one of which must match the named data item. * @return * a condition statement that can be included in the policy document * belonging to an S3 POST form. */ public static String generatePostPolicyCondition_Equality(String name, List<String> values) { return "{\"" + name + "\": \"" + ServiceUtils.join(values, ",") + "\"}"; }
/** * Generates a policy document condition statement to represent an * equality test. * * @param name * the name of the data item that will be tested. * @param values * a list of values, one of which must match the named data item. * @return * a condition statement that can be included in the policy document * belonging to an S3 POST form. */ public static String generatePostPolicyCondition_Equality(String name, String[] values) { return "{\"" + name + "\": \"" + ServiceUtils.join(values, ",") + "\"}"; }
hostSplit[hostSplit.length - 3] = "s3-" + region; String newHost = ServiceUtils.join(hostSplit, "."); try { String rawPathAndQuery = uri.getRawPath();
hostSplit[hostSplit.length - 3] = "s3-" + region; String newHost = ServiceUtils.join(hostSplit, "."); try { String rawPathAndQuery = uri.getRawPath();
+ "\", \"conditions\": [" + ServiceUtils.join(conditions, ",") + "]}"; if (log.isDebugEnabled()) { log.debug("Policy document for POST form:\n" + policyDocument); "enctype=\"multipart/form-data\">\n" + "<input type=\"hidden\" name=\"key\" value=\"" + key + "\"/>\n" + ServiceUtils.join(myInputFields, "\n") + "\n" + "<input type=\"submit\" value=\"" + submitButtonName + "\"/>\n" +
+ "\", \"conditions\": [" + ServiceUtils.join(conditions, ",") + "]}"; if (log.isDebugEnabled()) { log.debug("Policy document for POST form:\n" + policyDocument); "enctype=\"multipart/form-data\">\n" + "<input type=\"hidden\" name=\"key\" value=\"" + key + "\"/>\n" + ServiceUtils.join(myInputFields, "\n") + "\n" + "<input type=\"submit\" value=\"" + submitButtonName + "\"/>\n" +
String tags = ServiceUtils.join(ifMatchTags, ","); metadata.put(getRestHeaderPrefix() + "copy-source-if-match", tags); if (log.isDebugEnabled()) { String tags = ServiceUtils.join(ifNoneMatchTags, ","); metadata.put(getRestHeaderPrefix() + "copy-source-if-none-match", tags); if (log.isDebugEnabled()) {
String tags = ServiceUtils.join(ifMatchTags, ","); metadata.put(getRestHeaderPrefix() + "copy-source-if-match", tags); if (log.isDebugEnabled()) { String tags = ServiceUtils.join(ifNoneMatchTags, ","); metadata.put(getRestHeaderPrefix() + "copy-source-if-none-match", tags); if (log.isDebugEnabled()) {
+ " request for '" + httpMethod.getURI().toString() + "', expecting response codes: " + "[" + ServiceUtils.join(expectedResponseCodes, ",") + "]"); log.debug("Headers: " + Arrays.asList(httpMethod.getAllHeaders())); + " -- ResponseCode: " + responseCode + ", ResponseStatus: " + response.getStatusLine().getReasonPhrase() + ", Request Headers: [" + ServiceUtils.join(httpMethod.getAllHeaders(), ", ") + "]" + ", Response Headers: [" + ServiceUtils.join(response.getAllHeaders(), ", ") + "]"; requestDescription = requestDescription.replaceAll("[\\n\\r\\f]", ""); // Remove any newlines. log.warn("Retrying request following error response: " + requestDescription);
String tags = ServiceUtils.join(ifMatchTags, ","); metadata.put(this.getRestHeaderPrefix() + "copy-source-if-match", tags); if(log.isDebugEnabled()) { String tags = ServiceUtils.join(ifNoneMatchTags, ","); metadata.put(this.getRestHeaderPrefix() + "copy-source-if-none-match", tags); if(log.isDebugEnabled()) {
+ " request for '" + httpMethod.getURI().toString() + "', expecting response codes: " + "[" + ServiceUtils.join(expectedResponseCodes, ",") + "]"); log.debug("Headers: " + Arrays.asList(httpMethod.getAllHeaders())); + " -- ResponseCode: " + responseCode + ", ResponseStatus: " + response.getStatusLine().getReasonPhrase() + ", Request Headers: [" + ServiceUtils.join(httpMethod.getAllHeaders(), ", ") + "]" + ", Response Headers: [" + ServiceUtils.join(response.getAllHeaders(), ", ") + "]"; requestDescription = requestDescription.replaceAll("[\\n\\r\\f]", ""); // Remove any newlines. log.warn("Retrying request following error response: " + requestDescription);
String tags = ServiceUtils.join(ifMatchTags, ","); metadata.put(this.getRestHeaderPrefix() + "copy-source-if-match", tags); if(log.isDebugEnabled()) { String tags = ServiceUtils.join(ifNoneMatchTags, ","); metadata.put(this.getRestHeaderPrefix() + "copy-source-if-none-match", tags); if(log.isDebugEnabled()) {
accessKey + "/" + datestampISO8601 + "/" + region + "/" + service + "/aws4_request"; String signedHeaders = ServiceUtils.join( headersToSignMap.keySet().toArray(), ";");
accessKey + "/" + datestampISO8601 + "/" + region + "/" + service + "/aws4_request"; String signedHeaders = ServiceUtils.join( headersToSignMap.keySet().toArray(), ";");