#7971 Incorrect Content-Type on first CSS requests, causing CSS not to be used

v1.3.2
closed
nobody
General
nobody
2015-10-05
2015-08-18
No

I can't pull up an example right now unfortunately since it's only occasional. I think the URLs are the ones with _ew_ in the path.

And then if the response gets cached, then subsequent page loads still don't work either.

[#7028] was for the same issue, so see that for additional details. That ticket just resulted in a workaround, but its not great (especially if it gets cached). This ticket is for a real fix.

Related

Tickets: #7028

Discussion

  • Dave Brondsema

    Dave Brondsema - 2015-09-21
    • labels: ux, getting-started --> ux, getting-started, sf-2, sf-current
    • status: open --> in-progress
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2015-09-23

    tl;dr I've fixed one issue in EasyWidgets and upgraded Allura's version of it. Not sure if it fixes root cause

    I'm not sure why the content type is missing (and not detected) in the first place, but I have found a bug in EasyWidgets where the headers from one request were essentially being saved and re-used again for subsequent requests. This is fixed in https://bitbucket.org/rick446/easywidgets/commits/e7cb2dc70fe976e15d3bc2f6987ac9e9feb280c9

    You can see for example:

    # substitute 1276635823 if you have a different build_key in your .ini file
    curl -I 'http://localhost/nf/1276635823/_ew_/allura/fonts/fontawesome-webfont.woff'   # Content-Type: application/octet-stream   Correct, since woff isn't known
    curl -I 'http://localhost/nf/1276635823/_ew_/allura/css/forge/hilite.css'   # Content-Type: text/css    Correct
    curl -I 'http://localhost/nf/1276635823/_ew_/allura/fonts/fontawesome-webfont.woff'   # Content-Type: text/css    Incorrect, using header from last response
    

    Upgrading EasyWidgets should fix that particular bug. Not entirely sure if it fixes the original issue, since I dont' know why the type isn't picked up the first time, sometimes. So I've gone ahead and done that, but leaving this ticket open to find out if any issues remain.

    If/when we finally fix this, we should also remove the <h2 class="hidden"> section in Allura/allura/templates/jinja_master/master.html. It shows up in search engines sometimes :(

     
  • Dave Brondsema

    Dave Brondsema - 2015-09-23
    • status: in-progress --> open
    • assigned_to: Dave Brondsema --> nobody
     
  • Dave Brondsema

    Dave Brondsema - 2015-10-05
    • labels: ux, getting-started, sf-2, sf-current --> ux, getting-started, sf-2
    • status: open --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2015-10-05

    I've removed the hidden CSS mimetime notice and cache clearing recommendation. We want to know if this happens any more. If it does, we can reopen a ticket.

     
  • Dave Brondsema

    Dave Brondsema - 2015-12-08
    • Milestone: unreleased --> v1.3.2
     

Log in to post a comment.