You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by krishna-pandey <gi...@git.apache.org> on 2017/09/04 09:54:50 UTC
[GitHub] zeppelin pull request #2564: [ZEPPELIN-2896] Replacing addHeader with setHea...
GitHub user krishna-pandey opened a pull request:
https://github.com/apache/zeppelin/pull/2564
[ZEPPELIN-2896] Replacing addHeader with setHeader method in CorsFilter.java
### What is this PR for?
HTTP Response Headers were being added multiple times. Replacing addHeader method with setHeader overrides the Response Header value with new/existing value instead of adding another duplicate response Header.
### What type of PR is it?
[Bug Fix]
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-2896
### How should this be tested?
Open the Zeppelin URL in Chrome Browser. Select "More Tools" -> "Developer Tools" from the right-side menu. Under Network Section, select the request with name "localhost" and check for "Response Headers". You should see response headers appearing only once.
![screen shot 2017-09-04 at 3 21 32 pm](https://user-images.githubusercontent.com/6433184/30021436-feb7a6e4-9184-11e7-9161-f9f8350b7df2.png)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/krishna-pandey/zeppelin ZEPPELIN-2896
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/2564.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 #2564
----
commit 89a3fdcd3994070f872ca755587a0f10f76c6917
Author: krishna-pandey <kr...@gmail.com>
Date: 2017-09-04T09:39:59Z
replacing addHeader with setHeader
----
---
[GitHub] zeppelin issue #2564: [ZEPPELIN-2896] Replacing addHeader with setHeader met...
Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:
https://github.com/apache/zeppelin/pull/2564
LGTM
---
[GitHub] zeppelin issue #2564: [ZEPPELIN-2896] Replacing addHeader with setHeader met...
Posted by krishna-pandey <gi...@git.apache.org>.
Github user krishna-pandey commented on the issue:
https://github.com/apache/zeppelin/pull/2564
@felixcheung IMHO, it happens coz we first hit the root Context Path and Jetty redirecting it later to the landing/welcome page i.e. index.html. These headers are duplicated only for such requests and not every request.
---
[GitHub] zeppelin pull request #2564: [ZEPPELIN-2896] Replacing addHeader with setHea...
Posted by krishna-pandey <gi...@git.apache.org>.
Github user krishna-pandey closed the pull request at:
https://github.com/apache/zeppelin/pull/2564
---
[GitHub] zeppelin pull request #2564: [ZEPPELIN-2896] Replacing addHeader with setHea...
Posted by krishna-pandey <gi...@git.apache.org>.
GitHub user krishna-pandey reopened a pull request:
https://github.com/apache/zeppelin/pull/2564
[ZEPPELIN-2896] Replacing addHeader with setHeader method in CorsFilter.java
### What is this PR for?
HTTP Response Headers were being added multiple times. Replacing addHeader method with setHeader overrides the Response Header value with new/existing value instead of adding another duplicate response Header.
### What type of PR is it?
[Bug Fix]
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-2896
### How should this be tested?
Open the Zeppelin URL in Chrome Browser. Select "More Tools" -> "Developer Tools" from the right-side menu. Under Network Section, select the request with name "localhost" and check for "Response Headers". You should see response headers appearing only once.
![screen shot 2017-09-04 at 3 21 32 pm](https://user-images.githubusercontent.com/6433184/30021436-feb7a6e4-9184-11e7-9161-f9f8350b7df2.png)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/krishna-pandey/zeppelin ZEPPELIN-2896
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/2564.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 #2564
----
----
---
[GitHub] zeppelin issue #2564: [ZEPPELIN-2896] Replacing addHeader with setHeader met...
Posted by 1ambda <gi...@git.apache.org>.
Github user 1ambda commented on the issue:
https://github.com/apache/zeppelin/pull/2564
Tested locally and works well. Thanks for the fix.
---
[GitHub] zeppelin issue #2564: [ZEPPELIN-2896] Replacing addHeader with setHeader met...
Posted by 1ambda <gi...@git.apache.org>.
Github user 1ambda commented on the issue:
https://github.com/apache/zeppelin/pull/2564
@prabhjyotsingh I think we can merge this PR into 0.7.3-RC1 as well. What do u think?
---
[GitHub] zeppelin issue #2564: [ZEPPELIN-2896] Replacing addHeader with setHeader met...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2564
Merging this to master and branch-0.7 if no more discussion.
---
[GitHub] zeppelin issue #2564: [ZEPPELIN-2896] Replacing addHeader with setHeader met...
Posted by krishna-pandey <gi...@git.apache.org>.
Github user krishna-pandey commented on the issue:
https://github.com/apache/zeppelin/pull/2564
@1ambda, @Leemoonsoo, @felixcheung, @jongyoul, @prabhjyotsingh Please help review this.
---
[GitHub] zeppelin issue #2564: [ZEPPELIN-2896] Replacing addHeader with setHeader met...
Posted by krishna-pandey <gi...@git.apache.org>.
Github user krishna-pandey commented on the issue:
https://github.com/apache/zeppelin/pull/2564
@1ambda @Leemoonsoo Can you please help review this fix? As this is related to [ZEPPELIN-2775] which is getting shipped in 0.7.3, we may want to merge this now and get this as well into RC2.
---
[GitHub] zeppelin pull request #2564: [ZEPPELIN-2896] Replacing addHeader with setHea...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/zeppelin/pull/2564
---