Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P demos_ccm
- Index: src/main/java/eu/dedalus/demos/plugin/target/RestTarget.java
- ===================================================================
- --- workspace.catania/demos_ccm/src/main/java/eu/dedalus/demos/plugin/target/RestTarget.java (revision 12533)
- +++ workspace.catania/demos_ccm/src/main/java/eu/dedalus/demos/plugin/target/RestTarget.java (working copy)
- @@ -100,7 +100,7 @@
- private static final String REQUEST_MEDIA_TYPE = "requestMediaType";
- private static final String TRANSCLUDE_RESPONSE = "transcludeResponse";
- private static final String FULL_RESPONSE = "fullResponse";
- - private static final String AUTHORIZATION = "Authorization";
- + private static final String AUTHORIZATION = "authorization";
- private static final String TRUST_ALL_HOSTNAME = "trustAllHostname";
- private TargetDTO targetDTO;
- @@ -214,7 +214,7 @@
- this.fullResponse = Boolean.parseBoolean(target.get(FULL_RESPONSE));
- log.trace("Will return a full response?: " + this.fullResponse);
- - this.authorization = target.get(RestUtils.AUTHORIZATION);
- + this.authorization = target.get(AUTHORIZATION);
- // log.trace("Target authorization: " + this.authorization);
- this.trustAllHostname = Boolean.parseBoolean(target.get(TRUST_ALL_HOSTNAME));
- @@ -514,7 +514,7 @@
- }
- if (StringUtils.isNotEmpty(paramAuth)) {
- - invocationBuilder = invocationBuilder.header(AUTHORIZATION, paramAuth);
- + invocationBuilder = invocationBuilder.header("Authorization", paramAuth);
- invocationBuilder = invocationBuilder.header(RestUtils.AUTHORIZATION, paramAuth);
- try {
- invocationBuilder = invocationBuilder.header("Content-Length", data.getBytes("UTF-8").length);
- @@ -522,7 +522,7 @@
- }
- } else if (StringUtils.isNotEmpty(this.authorization)) {
- - invocationBuilder = invocationBuilder.header(AUTHORIZATION, this.authorization);
- + invocationBuilder = invocationBuilder.header("Authorization", this.authorization);
- invocationBuilder = invocationBuilder.header(RestUtils.AUTHORIZATION, this.authorization);
- }
- @@ -634,6 +634,7 @@
- public String minifyMessage(String message) {
- + // TODO: creare metodo "minifyJSON" in J e metodo MediaTypeUtils.minify(message, mediatype) che gestirà sia xml (XMLUtils.minify) che J.minifyJSON)
- ObjectMapper objectMapper = new ObjectMapper();
- JsonNode jsonNode;
- try {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement