Skip to content

Commit 2e3e7f4

Browse files
author
Xin Zheng
committed
fixed wrong code location, added TODO for remove those safe code once on more old data
1 parent f4a1ff5 commit 2e3e7f4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

gateleen-core/src/main/java/org/swisspush/gateleen/core/event/EventBusHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ public boolean handle(final HttpServerRequest request) {
183183
} else if (responseContentType != null && responseContentType.contains(TEXT)) {
184184
rsp.end(response.getString(PAYLOAD));
185185
} else {
186+
//TODO: remove decodeBase64Safe back to getBinary once we have no more old data in storage
187+
//rsp.end(Buffer.buffer(response.getBinary(PAYLOAD)));
186188
rsp.end(Buffer.buffer(Base64Unit.decodeBase64Safe(response.getString(PAYLOAD))));
187189
}
188190
} catch (DecodeException e) {

gateleen-core/src/main/java/org/swisspush/gateleen/core/http/HttpRequest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ public HttpRequest(JsonObject object) {
8383
JsonArray headersArray = object.getJsonArray("headers");
8484
if (headersArray != null) {
8585
this.headers = JsonMultiMap.fromJson(headersArray);
86-
this.payload = Base64Unit.decodeBase64Safe(object.getString("payload"));
8786
}
87+
//TODO: remove decodeBase64Safe back to getBinary once we have no more old data in storage
88+
//this.payload = object.getBinary("payload");
89+
this.payload = Base64Unit.decodeBase64Safe(object.getString("payload"));
8890
}
8991

9092
public JsonObject toJsonObject() {

0 commit comments

Comments
 (0)