[jira] [Commented] (FLINK-7226) REST responses contain invalid content-encoding header

2018-03-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16386349#comment-16386349
 ] 

ASF GitHub Bot commented on FLINK-7226:
---

Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/5590


> REST responses contain invalid content-encoding header
> --
>
> Key: FLINK-7226
> URL: https://issues.apache.org/jira/browse/FLINK-7226
> Project: Flink
>  Issue Type: Bug
>  Components: Webfrontend
>Affects Versions: 1.2.0, 1.1.4, 1.3.1, 1.4.0
>Reporter: Chesnay Schepler
>Assignee: Chesnay Schepler
>Priority: Major
> Fix For: 1.4.0, 1.3.2
>
>
> FLINK-5705 made changes to the {{RuntimeMonitorHandler}} to set the 
> {{content-encoding}} header to {{UTF-8}}. This however isn't a valid value 
> for this header, and should instead be included in the {{content-type}} 
> header.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-7226) REST responses contain invalid content-encoding header

2018-02-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16378728#comment-16378728
 ] 

ASF GitHub Bot commented on FLINK-7226:
---

GitHub user zentol opened a pull request:

https://github.com/apache/flink/pull/5590

[hotfix][REST] Fix CONTENT_TYPE header

This PR reverts an accidental modification to the REST CONTENT_TYPE header 
used by the new rest handlers.

This constants was introduced in 
https://issues.apache.org/jira/browse/FLINK-7226.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zentol/flink hotfix_rest_ct

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/5590.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #5590


commit 952a8e87a27587d2cbf4a55c05a5772e73133d09
Author: zentol 
Date:   2018-02-27T15:04:57Z

[hotfix][REST] Fix CONTENT_TYPE header




> REST responses contain invalid content-encoding header
> --
>
> Key: FLINK-7226
> URL: https://issues.apache.org/jira/browse/FLINK-7226
> Project: Flink
>  Issue Type: Bug
>  Components: Webfrontend
>Affects Versions: 1.2.0, 1.1.4, 1.3.1, 1.4.0
>Reporter: Chesnay Schepler
>Assignee: Chesnay Schepler
>Priority: Major
> Fix For: 1.4.0, 1.3.2
>
>
> FLINK-5705 made changes to the {{RuntimeMonitorHandler}} to set the 
> {{content-encoding}} header to {{UTF-8}}. This however isn't a valid value 
> for this header, and should instead be included in the {{content-type}} 
> header.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-7226) REST responses contain invalid content-encoding header

2017-08-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123939#comment-16123939
 ] 

ASF GitHub Bot commented on FLINK-7226:
---

Github user zentol commented on the issue:

https://github.com/apache/flink/pull/4392
  
@willddy Please open a new JIRA @ 
https://issues.apache.org/jira/browse/FLINK with a description of what error 
you are encountering. I looked through the code and we never set the encoding 
header _anywhere_; i expect your issue to be separate from this one.


> REST responses contain invalid content-encoding header
> --
>
> Key: FLINK-7226
> URL: https://issues.apache.org/jira/browse/FLINK-7226
> Project: Flink
>  Issue Type: Bug
>  Components: Webfrontend
>Affects Versions: 1.2.0, 1.1.4, 1.3.1, 1.4.0
>Reporter: Chesnay Schepler
>Assignee: Chesnay Schepler
> Fix For: 1.4.0, 1.3.2
>
>
> FLINK-5705 made changes to the {{RuntimeMonitorHandler}} to set the 
> {{content-encoding}} header to {{UTF-8}}. This however isn't a valid value 
> for this header, and should instead be included in the {{content-type}} 
> header.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-7226) REST responses contain invalid content-encoding header

2017-08-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123437#comment-16123437
 ] 

ASF GitHub Bot commented on FLINK-7226:
---

Github user willddy commented on the issue:

https://github.com/apache/flink/pull/4392
  
I still found this issue only when the job id not found as follows in the 
latest v1.3.2. Pls. reopen the issue
localhost:8001/jobs/0e12860ffae73f23dc104aedb814d6d2


> REST responses contain invalid content-encoding header
> --
>
> Key: FLINK-7226
> URL: https://issues.apache.org/jira/browse/FLINK-7226
> Project: Flink
>  Issue Type: Bug
>  Components: Webfrontend
>Affects Versions: 1.2.0, 1.1.4, 1.3.1, 1.4.0
>Reporter: Chesnay Schepler
>Assignee: Chesnay Schepler
> Fix For: 1.4.0, 1.3.2
>
>
> FLINK-5705 made changes to the {{RuntimeMonitorHandler}} to set the 
> {{content-encoding}} header to {{UTF-8}}. This however isn't a valid value 
> for this header, and should instead be included in the {{content-type}} 
> header.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-7226) REST responses contain invalid content-encoding header

2017-07-26 Thread Chesnay Schepler (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16101498#comment-16101498
 ] 

Chesnay Schepler commented on FLINK-7226:
-

1.4: 113b8c41da4b5d5be2e890e3e38567272f7dff9a

> REST responses contain invalid content-encoding header
> --
>
> Key: FLINK-7226
> URL: https://issues.apache.org/jira/browse/FLINK-7226
> Project: Flink
>  Issue Type: Bug
>  Components: Webfrontend
>Affects Versions: 1.2.0, 1.1.4, 1.3.1, 1.4.0
>Reporter: Chesnay Schepler
>Assignee: Chesnay Schepler
> Fix For: 1.4.0, 1.3.2
>
>
> FLINK-5705 made changes to the {{RuntimeMonitorHandler}} to set the 
> {{content-encoding}} header to {{UTF-8}}. This however isn't a valid value 
> for this header, and should instead be included in the {{content-type}} 
> header.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-7226) REST responses contain invalid content-encoding header

2017-07-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16101494#comment-16101494
 ] 

ASF GitHub Bot commented on FLINK-7226:
---

Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/4392


> REST responses contain invalid content-encoding header
> --
>
> Key: FLINK-7226
> URL: https://issues.apache.org/jira/browse/FLINK-7226
> Project: Flink
>  Issue Type: Bug
>  Components: Webfrontend
>Affects Versions: 1.2.0, 1.1.4, 1.3.1, 1.4.0
>Reporter: Chesnay Schepler
>Assignee: Chesnay Schepler
> Fix For: 1.4.0, 1.3.2
>
>
> FLINK-5705 made changes to the {{RuntimeMonitorHandler}} to set the 
> {{content-encoding}} header to {{UTF-8}}. This however isn't a valid value 
> for this header, and should instead be included in the {{content-type}} 
> header.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-7226) REST responses contain invalid content-encoding header

2017-07-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16101353#comment-16101353
 ] 

ASF GitHub Bot commented on FLINK-7226:
---

Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/4392#discussion_r129514223
  
--- Diff: 
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JobCancellationWithSavepointHandlers.java
 ---
@@ -266,7 +266,7 @@ public void onComplete(Throwable failure, Object resp) 
throws Throwable {
 
response.headers().set(HttpHeaders.Names.LOCATION, 
location);
 
-   response.headers().set(HttpHeaders.Names.CONTENT_TYPE, 
"application/json");
+   response.headers().set(HttpHeaders.Names.CONTENT_TYPE, 
"application/json; charset=UTF-8");
--- End diff --

yes, will fix it and search for other occurrences while merging.


> REST responses contain invalid content-encoding header
> --
>
> Key: FLINK-7226
> URL: https://issues.apache.org/jira/browse/FLINK-7226
> Project: Flink
>  Issue Type: Bug
>  Components: Webfrontend
>Affects Versions: 1.2.0, 1.1.4, 1.3.1, 1.4.0
>Reporter: Chesnay Schepler
>Assignee: Chesnay Schepler
> Fix For: 1.4.0, 1.3.2
>
>
> FLINK-5705 made changes to the {{RuntimeMonitorHandler}} to set the 
> {{content-encoding}} header to {{UTF-8}}. This however isn't a valid value 
> for this header, and should instead be included in the {{content-type}} 
> header.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-7226) REST responses contain invalid content-encoding header

2017-07-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16100101#comment-16100101
 ] 

ASF GitHub Bot commented on FLINK-7226:
---

Github user greghogan commented on a diff in the pull request:

https://github.com/apache/flink/pull/4392#discussion_r129317438
  
--- Diff: 
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JobCancellationWithSavepointHandlers.java
 ---
@@ -266,7 +266,7 @@ public void onComplete(Throwable failure, Object resp) 
throws Throwable {
 
response.headers().set(HttpHeaders.Names.LOCATION, 
location);
 
-   response.headers().set(HttpHeaders.Names.CONTENT_TYPE, 
"application/json");
+   response.headers().set(HttpHeaders.Names.CONTENT_TYPE, 
"application/json; charset=UTF-8");
--- End diff --

Should this also use `ENCODING.name()`?


> REST responses contain invalid content-encoding header
> --
>
> Key: FLINK-7226
> URL: https://issues.apache.org/jira/browse/FLINK-7226
> Project: Flink
>  Issue Type: Bug
>  Components: Webfrontend
>Affects Versions: 1.2.0, 1.1.4, 1.3.1, 1.4.0
>Reporter: Chesnay Schepler
>Assignee: Chesnay Schepler
> Fix For: 1.4.0, 1.3.2
>
>
> FLINK-5705 made changes to the {{RuntimeMonitorHandler}} to set the 
> {{content-encoding}} header to {{UTF-8}}. This however isn't a valid value 
> for this header, and should instead be included in the {{content-type}} 
> header.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (FLINK-7226) REST responses contain invalid content-encoding header

2017-07-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16099804#comment-16099804
 ] 

ASF GitHub Bot commented on FLINK-7226:
---

GitHub user zentol opened a pull request:

https://github.com/apache/flink/pull/4392

[FLINK-7226] [webUI] Properly include UTF-8 in content-type header

This PR corrects the `content-encoding` header introduced in FLINK-5705. As 
documented 
[here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding)
 this header is used to denote how the content is compressed (for example, with 
gzip or deflate).

That the strings are encoded using `UTF-8` should be documented in the 
`content-type` header instead, using the `charset` parameter, as documented 
[here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type).

There was also a bug in `TestBaseUtils#getFromHTTP`, where the UTF-8 
charset was retrieved from the `content-encoding` header.

I've added tests to make sure we don't break this _again_.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zentol/flink 7226

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/4392.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #4392


commit 3093d53f6f07afcc351b99a39586463fb0a0b83e
Author: zentol 
Date:   2017-07-19T11:51:35Z

[FLINK-7226] [webUI] Properly include UTF-8 in content-type header




> REST responses contain invalid content-encoding header
> --
>
> Key: FLINK-7226
> URL: https://issues.apache.org/jira/browse/FLINK-7226
> Project: Flink
>  Issue Type: Bug
>  Components: Webfrontend
>Affects Versions: 1.2.0, 1.1.4, 1.3.1, 1.4.0
>Reporter: Chesnay Schepler
>Assignee: Chesnay Schepler
> Fix For: 1.4.0, 1.3.2
>
>
> FLINK-5705 made changes to the {{RuntimeMonitorHandler}} to set the 
> {{content-encoding}} header to {{UTF-8}}. This however isn't a valid value 
> for this header, and should instead be included in the {{content-type}} 
> header.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)