Skip to content
Closed
Show file tree
Hide file tree
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 @@ -107,8 +107,8 @@ public void channelRead0(ChannelHandlerContext ctx, HttpObject msg) {
else if (currentRequest.getMethod() == HttpMethod.POST) {
// POST comes in multiple objects. First the request, then the contents
// keep the request and path for the remaining objects of the POST request
currentRequestPath = new QueryStringDecoder(currentRequest.getUri()).path();
currentDecoder = new HttpPostRequestDecoder(DATA_FACTORY, currentRequest);
currentRequestPath = new QueryStringDecoder(currentRequest.getUri(), ENCODING).path();
currentDecoder = new HttpPostRequestDecoder(DATA_FACTORY, currentRequest, ENCODING);
}
else {
throw new IOException("Unsupported HTTP method: " + currentRequest.getMethod().name());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import java.net.URLDecoder;
import org.apache.flink.runtime.instance.ActorGateway;
import org.apache.flink.runtime.webmonitor.files.MimeTypes;
import org.apache.flink.runtime.webmonitor.handlers.RequestHandler;
import org.apache.flink.util.ExceptionUtils;

Expand Down Expand Up @@ -116,6 +117,8 @@ protected void respondAsLeader(ChannelHandlerContext ctx, Routed routed, ActorGa
}

response.headers().set(HttpHeaders.Names.ACCESS_CONTROL_ALLOW_ORIGIN, "*");
// Content-Encoding:utf-8
response.headers().set(HttpHeaders.Names.CONTENT_ENCODING, ENCODING.name());

KeepAliveWrite.flush(ctx, routed.request(), response);
}
Expand Down