Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submission on source interface does not produce flashed message #1763

Closed
redshiftzero opened this issue May 31, 2017 · 3 comments
Closed

Submission on source interface does not produce flashed message #1763

redshiftzero opened this issue May 31, 2017 · 3 comments

Comments

@redshiftzero
Copy link
Contributor

Description

A first time submission to the source interface does not produce a flashed message in the staging environment using Tor Browser.

Steps to reproduce

  1. Provision staging VMs
  2. Load the source interface in Tor Browser.
  3. Generate a new codename.
  4. Submit a test message "blah".

What should happen

A flashed message like this one should appear:

screen shot 2017-05-30 at 7 17 17 pm

What actually happens

No flashed message is shown. If you refresh the page, the flashed message will then appear. Subsequent submissions will produce the flashed message. Also note that this problem does not appear in Chrome.

@garrettr
Copy link
Contributor

garrettr commented Jun 2, 2017

I think this is being caused by recent-ish changes to the cache headers (e.g. #1185). If you look at the Network panel while reproducing the issue, notice how the POST gets a 302 to /lookup, which then uses a cached copy.

screen shot 2017-06-02 at 2 10 03 pm

@garrettr
Copy link
Contributor

garrettr commented Jun 2, 2017

HTTP caching is a somewhat complex topic. Here's a good reference.

To fix this bug, we need to stop telling the browser to cache HTML responses for logged-in users; however, we should continue to cache images/stylesheets/scripts to maintain the improved user experience from #1185 (see also #1152 for background on the motivation for adding HTTP caching to the Source Interface). We may be able to do this entirely in the Apache configuration, or it may make more sense to move the cache header logic into Flask (similar to this Stack Overflow user's approach).

@garrettr garrettr assigned garrettr and unassigned psivesely Jun 2, 2017
@garrettr garrettr added this to the 0.4 milestone Jun 2, 2017
@garrettr
Copy link
Contributor

garrettr commented Jun 5, 2017

Discussed this in a meeting today. We all agreed that the Apache configuration needs to be reviewed and annotated, because:

  • Some if its directives may be redundant/pointless
  • There are few comments, which makes the configuration hard to audit.

A full rework should probably wait until after 0.4, since we're trying to keep changes minimal for 0.4 to minimize potential regressions. I'll file a new issue for reviewing and annotating the Apache configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants