Advertisement
Guest User

Untitled

a guest
Apr 10th, 2020
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.41 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P demos_ccm
  3. Index: src/main/java/eu/dedalus/demos/plugin/target/RestTarget.java
  4. ===================================================================
  5. --- workspace.catania/demos_ccm/src/main/java/eu/dedalus/demos/plugin/target/RestTarget.java    (revision 12533)
  6. +++ workspace.catania/demos_ccm/src/main/java/eu/dedalus/demos/plugin/target/RestTarget.java    (working copy)
  7. @@ -100,7 +100,7 @@
  8.      private static final String REQUEST_MEDIA_TYPE = "requestMediaType";
  9.      private static final String TRANSCLUDE_RESPONSE = "transcludeResponse";
  10.      private static final String FULL_RESPONSE = "fullResponse";
  11. -    private static final String AUTHORIZATION = "Authorization";
  12. +    private static final String AUTHORIZATION = "authorization";
  13.      private static final String TRUST_ALL_HOSTNAME = "trustAllHostname";
  14.  
  15.      private TargetDTO targetDTO;
  16. @@ -214,7 +214,7 @@
  17.         this.fullResponse = Boolean.parseBoolean(target.get(FULL_RESPONSE));
  18.         log.trace("Will return a full response?: " + this.fullResponse);
  19.  
  20. -       this.authorization = target.get(RestUtils.AUTHORIZATION);
  21. +       this.authorization = target.get(AUTHORIZATION);
  22.         // log.trace("Target authorization: " + this.authorization);
  23.  
  24.         this.trustAllHostname = Boolean.parseBoolean(target.get(TRUST_ALL_HOSTNAME));
  25. @@ -514,7 +514,7 @@
  26.     }
  27.  
  28.     if (StringUtils.isNotEmpty(paramAuth)) {
  29. -       invocationBuilder = invocationBuilder.header(AUTHORIZATION, paramAuth);
  30. +       invocationBuilder = invocationBuilder.header("Authorization", paramAuth);
  31.         invocationBuilder = invocationBuilder.header(RestUtils.AUTHORIZATION, paramAuth);
  32.         try {
  33.         invocationBuilder = invocationBuilder.header("Content-Length", data.getBytes("UTF-8").length);
  34. @@ -522,7 +522,7 @@
  35.  
  36.         }
  37.     } else if (StringUtils.isNotEmpty(this.authorization)) {
  38. -       invocationBuilder = invocationBuilder.header(AUTHORIZATION, this.authorization);
  39. +       invocationBuilder = invocationBuilder.header("Authorization", this.authorization);
  40.         invocationBuilder = invocationBuilder.header(RestUtils.AUTHORIZATION, this.authorization);
  41.     }
  42.  
  43. @@ -634,6 +634,7 @@
  44.  
  45.  
  46.      public String minifyMessage(String message) {
  47. +   // TODO: creare metodo "minifyJSON" in J e metodo MediaTypeUtils.minify(message, mediatype) che gestirà sia xml (XMLUtils.minify) che J.minifyJSON)
  48.     ObjectMapper objectMapper = new ObjectMapper();
  49.     JsonNode jsonNode;
  50.     try {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement