Bug 1324401

Summary: Firefox sometimes shows a pile of recipe JSON instead of the HTML recipe page when re-opening a closed tab
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: web UIAssignee: matt jia <mjia>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: developCC: dcallagh, dowang, mjia, rjoost
Target Milestone: 23.0Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-07 23:10:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dan Callaghan 2016-04-06 09:23:20 UTC
(only unreleased develop)

Steps to reproduce:
1. Open the recipe page for a recipe which is running or queued
2. Wait > 30 seconds (this is the polling interval at which the page automatically re-fetches its JSON model)
3. Close the tab
4. Press Ctrl-Shift-T to reopen the closed tab

Expected results:
should see the page

Actual results:
shows a pile of JSON

Comment 1 Dan Callaghan 2016-04-06 09:24:44 UTC
One thought I had was that we should be setting Vary: Accept since we are doing content negotation for /recipes/123. We should probably just set it globally on all responses (apart from static files anyway) since we expect to do content negotiation in most or all of our new endpoints.

Not sure if that will fix this problem though.

Comment 2 matt jia 2016-04-07 05:54:48 UTC
(In reply to Dan Callaghan from comment #1)
> One thought I had was that we should be setting Vary: Accept since we are
> doing content negotation for /recipes/123. We should probably just set it
> globally on all responses (apart from static files anyway) since we expect
> to do content negotiation in most or all of our new endpoints.
> 
> Not sure if that will fix this problem though.

Setting Vary:Accept fixes the problem. I have verified it on both Firefox and Google Chrome.

http://gerrit.beaker-project.org/#/c/4784/

Comment 3 matt jia 2016-04-08 00:38:04 UTC
(In reply to matt jia from comment #2)
> (In reply to Dan Callaghan from comment #1)
> > One thought I had was that we should be setting Vary: Accept since we are
> > doing content negotation for /recipes/123. We should probably just set it
> > globally on all responses (apart from static files anyway) since we expect
> > to do content negotiation in most or all of our new endpoints.
> > 
> > Not sure if that will fix this problem though.
> 
> Setting Vary:Accept fixes the problem. I have verified it on both Firefox
> and Google Chrome.
> 
> http://gerrit.beaker-project.org/#/c/4784/

Repost with correct branch

    http://gerrit.beaker-project.org/#/c/4789/

Comment 6 Dan Callaghan 2016-07-07 23:10:37 UTC
Beaker 23.0 has been released.