<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Transition Technology: Ticket #334: Image serving on https</title>
    <link>http://localhost:8080/trac/ticket/334</link>
    <description>&lt;p&gt;
I note that images that are uploaded to the server are then served from https - e.g.:
&amp;lt;img alt="hands in sand image" src="&lt;a class="ext-link" href="https://www.transitionnetwork.org/sites/default/files/uploaded/u4/hands_in_sand.jpg"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://www.transitionnetwork.org/sites/default/files/uploaded/u4/hands_in_sand.jpg&lt;/a&gt;" width="120" height="120" align="left"&amp;gt;
&lt;/p&gt;
&lt;p&gt;
does this complicate things? browsers not liking secure and insecure items on a page?
&lt;/p&gt;
&lt;p&gt;
at the time of writing, the image was showing on
&lt;a class="ext-link" href="https://www.transitionnetwork.org/stories"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://www.transitionnetwork.org/stories&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
but not showing on
&lt;a class="ext-link" href="http://www.transitionnetwork.org/stories"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://www.transitionnetwork.org/stories&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I presume that is a caching issue?
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>Transition Technology</title>
      <url>/trac/chrome/site/TransitionNetwork-Logo-Web-Small.jpg</url>
      <link>http://localhost:8080/trac/ticket/334</link>
    </image>
    <generator>Trac 0.12.5</generator>
    <item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Wed, 14 Sep 2011 19:01:22 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/334#comment:1</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.1&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.1&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;blockquote class="citation"&gt;
&lt;p&gt;
does this complicate things? browsers not liking secure and insecure items on a page?
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
It means the images won't be cached by varnish, apart from that it's not a problem as a http page with https items in it won't trigger warnings.
&lt;/p&gt;
&lt;p&gt;
If the link was in the format src="/blah/" then it would be http or https depending what the client was using, the only drawback with embedding images and linking like this is that if the content is syndicated the links / embedded images won't work on the remote site unless the URL's are rewritten to be fully qualified.
&lt;/p&gt;
&lt;p&gt;
I expect it was a caching issue that prevented the image from showing up, you can always break the cache by adding a query string to the URL.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>ed</dc:creator>

      <pubDate>Thu, 15 Sep 2011 12:51:55 GMT</pubDate>
      <title></title>
      <link>http://localhost:8080/trac/ticket/334#comment:2</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:2</guid>
      <description>
        &lt;p&gt;
ta.
&lt;/p&gt;
&lt;p&gt;
there is a lag between adding things, then going on https, and http. How long does the cache take to cache http to https?
&lt;/p&gt;
&lt;p&gt;
I think this might be bamboozling some users adding content in profiles, need to keep an eye on it. Might need some explano-text somewhere.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 15 Sep 2011 13:09:02 GMT</pubDate>
      <title></title>
      <link>http://localhost:8080/trac/ticket/334#comment:3</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:3</guid>
      <description>
        &lt;p&gt;
I'm still unclear as to what's happening, when images are added they show up for logged in users on https but not for anon users on http?
&lt;/p&gt;
&lt;p&gt;
If that is what happening it'll be because the http version is being served from the varnish cache.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>ed</dc:creator>

      <pubDate>Mon, 19 Sep 2011 13:31:50 GMT</pubDate>
      <title></title>
      <link>http://localhost:8080/trac/ticket/334#comment:4</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:4</guid>
      <description>
        &lt;p&gt;
in my experience (to date always as a logged in user), the image (and any change) shows up on https immediately, and on http later...
&lt;/p&gt;
&lt;p&gt;
have found the lag is 30 mins - the social reporters were worried but calm now.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 20 Sep 2011 08:59:16 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/334#comment:5</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:5</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.05&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.1&lt;/em&gt; to &lt;em&gt;0.15&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Looking at the varnish configuration here:
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="https://www.transitionnetwork.org/admin/settings/varnish/general"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://www.transitionnetwork.org/admin/settings/varnish/general&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
We have "Varnish Cache Clearing" set to "Drupal Default" which is:
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
Drupal default will clear all page caches on node updates and cache flush events.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
Jim - does this mean that the cache should be flushed when an image is added to a page?
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 22 Sep 2011 12:24:42 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/334#comment:6</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:6</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.05&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.15&lt;/em&gt; to &lt;em&gt;0.2&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
This ticket had 9 mins on it, just testing adding some more to test &lt;a class="closed ticket" href="http://localhost:8080/trac/ticket/345" title="defect: TRAC time 'add hours' not working (closed: worksforme)"&gt;ticket:345&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>jim</dc:creator>

      <pubDate>Wed, 28 Sep 2011 16:57:41 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/334#comment:7</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:7</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.1&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.2&lt;/em&gt; to &lt;em&gt;0.3&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The caches should NOT be flushed when an image is added as the performance impact would be huge, they should expire naturally OR with the addition of this module: &lt;a class="ext-link" href="http://drupal.org/project/expire"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://drupal.org/project/expire&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In summary:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;images with a relative path (like /files/another-ed-cat-pic.jpg) will be in the same security context as the page -- e.g. via https when page is https, and http for http.
&lt;/li&gt;&lt;li&gt;Images with hard-coded protocol and domain (like &lt;a class="ext-link" href="http://www.transition"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://www.transition&lt;/a&gt;...) will always be displayed in that context.
&lt;/li&gt;&lt;li&gt;Since user NOW are logged in under https only, all new content should be fine -- provided relative or https links are used
&lt;/li&gt;&lt;li&gt;Old pages might have http references, which will cause complaints in many browsers.
&lt;/li&gt;&lt;li&gt;Absolute (i.e. with http(s) bit) are required for assets like images to work with RSS feeds.
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
Hence everything should ideally be https, then everything is happy except our server's performance.
&lt;/p&gt;
&lt;p&gt;
I don't know what to do about this, though there's various simple (like &lt;a class="ext-link" href="http://drupal.org/project/pathologic"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://drupal.org/project/pathologic&lt;/a&gt;) and horrible (like scanning all content looking for &lt;a class="ext-link" href="http://www.transition"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://www.transition&lt;/a&gt;... and replacing it with relative or https) things we could do.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 29 Sep 2011 11:04:55 GMT</pubDate>
      <title>cc, hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/334#comment:8</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:8</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;cc&lt;/strong&gt;
              &lt;em&gt;chris&lt;/em&gt; added
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.2&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.3&lt;/em&gt; to &lt;em&gt;0.5&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
&lt;a class="ext-link" href="http://drupal.org/project/pathologic"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://drupal.org/project/pathologic&lt;/a&gt; looks OK but it's a input filter?
&lt;/p&gt;
&lt;p&gt;
I'd have thought what is needed is an output filter on the RSS feeds to change relative URL's to http ones, eg running a regex like this on the content:
&lt;/p&gt;
&lt;pre class="wiki"&gt;s/="\//="http:\/\/www.transitionnetwork.org\//g
&lt;/pre&gt;&lt;p&gt;
Would this do the job?
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="http://www.nodeid.com/how-convert-all-relative-urls-absolute-urls-feed-items"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://www.nodeid.com/how-convert-all-relative-urls-absolute-urls-feed-items&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>jim</dc:creator>

      <pubDate>Thu, 29 Sep 2011 13:08:32 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/334#comment:9</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:9</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.075&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.5&lt;/em&gt; to &lt;em&gt;0.575&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
In Drupal-speak, input filters ARE output filters... They filter a user's input, but in the Drupal world, the original content is NEVER altered, merely post-processed and cached before it's rendered.
&lt;/p&gt;
&lt;p&gt;
Hence pathlogic will do what it says on the tin, and based on &lt;a class="ext-link" href="http://drupal.org/node/257026#example-use-cases"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://drupal.org/node/257026#example-use-cases&lt;/a&gt; I reckon it's the right tool for the job.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 29 Sep 2011 13:13:14 GMT</pubDate>
      <title></title>
      <link>http://localhost:8080/trac/ticket/334#comment:10</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:10</guid>
      <description>
        &lt;p&gt;
can pathlogic simply change the relatives URL's to absolute ones for RSS feeds -- we don't want it doing for HTML pages?
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>jim</dc:creator>

      <pubDate>Thu, 29 Sep 2011 16:09:24 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/334#comment:11</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:11</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.15&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.575&lt;/em&gt; to &lt;em&gt;0.725&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Yes we do.
&lt;/p&gt;
&lt;p&gt;
We want every link looked at because there are thousands of pages with absolute references in which will make the browser warn about insecure. RSS certainly needs absolute, but HTML needs relative. That's rewriting in both cases. Also, we can't guarantee users will use relative when adding links and images etc.
&lt;/p&gt;
&lt;p&gt;
I'll look into the pathlogic setup, but if you get to the bottom of this issue you'll see RSS and SSL are now handled in version 3.x: &lt;a class="ext-link" href="http://drupal.org/node/516294"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://drupal.org/node/516294&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>jim</dc:creator>

      <pubDate>Thu, 29 Sep 2011 16:10:51 GMT</pubDate>
      <title></title>
      <link>http://localhost:8080/trac/ticket/334#comment:12</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:12</guid>
      <description>
        &lt;p&gt;
I'll have a play on my machine...
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>jim</dc:creator>

      <pubDate>Thu, 29 Sep 2011 16:59:12 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/334#comment:13</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:13</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.15&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.725&lt;/em&gt; to &lt;em&gt;0.875&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
OK, so Pathlogic handles relative URLs fine, OR absolute fine... But not one for page views and another for RSS... In fact, having looked around the Drupal issues list, this is a problem even for Drupal 8...
&lt;/p&gt;
&lt;p&gt;
In a nutshell, Drupal outputs an xml base tag to tell the readers 'use &lt;a class="ext-link" href="http://blah"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://blah&lt;/a&gt;...' but some RSS readers don't support it. I think it's a case of 'tough boobies, use something good' for them...
&lt;/p&gt;
&lt;p&gt;
Again, will play on my machine further.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>ed</dc:creator>

      <pubDate>Thu, 27 Oct 2011 13:50:43 GMT</pubDate>
      <title></title>
      <link>http://localhost:8080/trac/ticket/334#comment:14</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:14</guid>
      <description>
        &lt;p&gt;
move into maintenance out of phase 5?
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 28 Oct 2011 07:58:28 GMT</pubDate>
      <title>cc, owner, type, status changed; milestone deleted</title>
      <link>http://localhost:8080/trac/ticket/334#comment:15</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:15</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;cc&lt;/strong&gt;
              &lt;em&gt;laura&lt;/em&gt; added
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;owner&lt;/strong&gt;
              changed from &lt;em&gt;chris&lt;/em&gt; to &lt;em&gt;jim&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;type&lt;/strong&gt;
                changed from &lt;em&gt;enhancement&lt;/em&gt; to &lt;em&gt;maintenance&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;assigned&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;milestone&lt;/strong&gt;
                &lt;em&gt;Phase 5&lt;/em&gt; deleted
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Type changed to maintenance, removed from Phase 5.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>jim</dc:creator>

      <pubDate>Fri, 28 Oct 2011 11:09:10 GMT</pubDate>
      <title></title>
      <link>http://localhost:8080/trac/ticket/334#comment:16</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:16</guid>
      <description>
        &lt;p&gt;
Pathologic is on LIVE waiting to be set up...
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>jim</dc:creator>

      <pubDate>Fri, 04 Nov 2011 15:17:17 GMT</pubDate>
      <title>hours, status, totalhours changed; resolution set</title>
      <link>http://localhost:8080/trac/ticket/334#comment:17</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/334#comment:17</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.1&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;assigned&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;needs testing&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.875&lt;/em&gt; to &lt;em&gt;0.975&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Pathologic is now enabled on LIVE... I've configured it to be gentle with HTTP(S), so please shout if any new issues arise.
&lt;/p&gt;
&lt;p&gt;
It should convert ALL local paths to relative URLs, so the HTTP(S) context won't muck up IE etc.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>