<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Released: Modify Headers 0.6.3</title>
	<atom:link href="http://www.garethhunt.com/2008/01/06/released-modify-headers-063/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/</link>
	<description>Firefox Addons, Mobile Web and living in the USA</description>
	<lastBuildDate>Wed, 28 Jul 2010 23:15:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: MazarD</title>
		<link>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/comment-page-1/#comment-1445</link>
		<dc:creator>MazarD</dc:creator>
		<pubDate>Thu, 04 Jun 2009 08:09:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/01/06/released-modify-headers-063/#comment-1445</guid>
		<description>Congratulations for this awesome extension!, but I also miss the modify response headers feature. Another usage could be to filter the location header for testing purposes, the developers would appreciate it very much. 

Best regards.
MazarD</description>
		<content:encoded><![CDATA[<p>Congratulations for this awesome extension!, but I also miss the modify response headers feature. Another usage could be to filter the location header for testing purposes, the developers would appreciate it very much. </p>
<p>Best regards.<br />
MazarD</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/comment-page-1/#comment-1412</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Fri, 08 May 2009 21:04:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/01/06/released-modify-headers-063/#comment-1412</guid>
		<description>I think the best reason to be able to modify server side headers is... freedom.</description>
		<content:encoded><![CDATA[<p>I think the best reason to be able to modify server side headers is&#8230; freedom.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: crono</title>
		<link>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/comment-page-1/#comment-1081</link>
		<dc:creator>crono</dc:creator>
		<pubDate>Tue, 22 Jan 2008 15:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/01/06/released-modify-headers-063/#comment-1081</guid>
		<description>Hi Gareth,

very nice - thanks for the info :-)

bye</description>
		<content:encoded><![CDATA[<p>Hi Gareth,</p>
<p>very nice &#8211; thanks for the info <img src='http://www.garethhunt.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>bye</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gareth</title>
		<link>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/comment-page-1/#comment-1077</link>
		<dc:creator>gareth</dc:creator>
		<pubDate>Mon, 21 Jan 2008 21:03:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/01/06/released-modify-headers-063/#comment-1077</guid>
		<description>Hi Crono, A feature similar to this is already on the roadmap.</description>
		<content:encoded><![CDATA[<p>Hi Crono, A feature similar to this is already on the roadmap.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: crono</title>
		<link>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/comment-page-1/#comment-1076</link>
		<dc:creator>crono</dc:creator>
		<pubDate>Mon, 21 Jan 2008 20:39:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/01/06/released-modify-headers-063/#comment-1076</guid>
		<description>Hi,
I found your extension today and think it&#039;s really great. It would be perfect for me when I could specify which headers are sent to which url (with regex). 

Example: 
x-test0 = 0000 @ http://[a-z\./]*
x-test = 1234 @ https://localhost/*
x-test2 = 5678 @ http://www\.mozilla\.org/*

and so on... Just an idea :-)</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I found your extension today and think it&#8217;s really great. It would be perfect for me when I could specify which headers are sent to which url (with regex). </p>
<p>Example:<br />
x-test0 = 0000 @ <a href="http://a-z" rel="nofollow">http://a-z</a>\./]*<br />
x-test = 1234 @ <a href="https://localhost/" rel="nofollow">https://localhost/</a>*<br />
x-test2 = 5678 @ <a href="http://www" rel="nofollow">http://www</a>\.mozilla\.org/*</p>
<p>and so on&#8230; Just an idea <img src='http://www.garethhunt.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NettiCat</title>
		<link>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/comment-page-1/#comment-1064</link>
		<dc:creator>NettiCat</dc:creator>
		<pubDate>Sat, 19 Jan 2008 23:30:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/01/06/released-modify-headers-063/#comment-1064</guid>
		<description>This may not be of interest for bloggers, but as all postings will be reviewed I&#039;ll post it anyway :-)
I made a small extension (BetterCache). It is a working demo concerning modification of response headers. You may use it in your own project:


function RespHeaderObserver()
{
  this.register();
}

RespHeaderObserver.prototype = {
  observe: function(subject, topic, data) {
      if (topic == &quot;http-on-examine-response&quot;) {
					var headers = new Array();
					headers[0] = &quot;Age&quot;;
					headers[1] = &quot;Cache-Control&quot;;
					headers[2] = &quot;Date&quot;;
					headers[3] = &quot;ETag&quot;;
					headers[4] = &quot;Expires&quot;;
					headers[5] = &quot;Last-Modified&quot;;
					headers[6] = &quot;Pragma&quot;;
					headers[7] = &quot;Vary&quot;;
					//headers[8] = &quot;Set-Cookie&quot;; //not anti-cache, but a better testpattern :-)
          var httpChannel = subject.QueryInterface(Components.interfaces.nsIHttpChannel);
					//need to test every (above defined) header for existance. If not existant, getResponseHeader will throw an exception.
					for(i = 0; i &lt; headers.length; i++){
	        	var headerval = &quot;&quot;;
						var replacement = &quot;&quot;;
						try{
							headerval = httpChannel.getResponseHeader (headers[i]);
								if(i == 6)//special case Pragma
										replacement = headerval.replace(/no\-cache/g, &quot;&quot;);
								httpChannel.setResponseHeader(headers[i], replacement, false);
						  	//alert(headers[i]+&#039;=&#039;+headerval);
						}catch(e){}//NS_ERROR_(header_)NOT_AVAILABLE
					}
    			headers = null;
          return;
      }
  },

  register: function() {
    var observerService = Components.classes[&quot;@mozilla.org/observer-service;1&quot;].getService(Components.interfaces.nsIObserverService);
    observerService.addObserver(this, &quot;http-on-examine-response&quot;, false);
  },
  unregister: function() {
    var observerService = Components.classes[&quot;@mozilla.org/observer-service;1&quot;].getService(Components.interfaces.nsIObserverService);
    try{
			observerService.removeObserver(this, &quot;http-on-examine-response&quot;);
		}catch(e){}
  }
}
//observer needs to be registered only once, so better use a XPT file
window.addEventListener(&quot;load&quot;, function(evnt) { observer = new RespHeaderObserver(); }, true);
window.addEventListener(&quot;unload&quot;, function(evnt) { observer.unregister(); }, true);</description>
		<content:encoded><![CDATA[<p>This may not be of interest for bloggers, but as all postings will be reviewed I&#8217;ll post it anyway <img src='http://www.garethhunt.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
I made a small extension (BetterCache). It is a working demo concerning modification of response headers. You may use it in your own project:</p>
<p>function RespHeaderObserver()<br />
{<br />
  this.register();<br />
}</p>
<p>RespHeaderObserver.prototype = {<br />
  observe: function(subject, topic, data) {<br />
      if (topic == &#8220;http-on-examine-response&#8221;) {<br />
					var headers = new Array();<br />
					headers[0] = &#8220;Age&#8221;;<br />
					headers[1] = &#8220;Cache-Control&#8221;;<br />
					headers[2] = &#8220;Date&#8221;;<br />
					headers[3] = &#8220;ETag&#8221;;<br />
					headers[4] = &#8220;Expires&#8221;;<br />
					headers[5] = &#8220;Last-Modified&#8221;;<br />
					headers[6] = &#8220;Pragma&#8221;;<br />
					headers[7] = &#8220;Vary&#8221;;<br />
					//headers[8] = &#8220;Set-Cookie&#8221;; //not anti-cache, but a better testpattern <img src='http://www.garethhunt.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
          var httpChannel = subject.QueryInterface(Components.interfaces.nsIHttpChannel);<br />
					//need to test every (above defined) header for existance. If not existant, getResponseHeader will throw an exception.<br />
					for(i = 0; i &lt; headers.length; i++){<br />
	        	var headerval = &#8220;&#8221;;<br />
						var replacement = &#8220;&#8221;;<br />
						try{<br />
							headerval = httpChannel.getResponseHeader (headers[i]);<br />
								if(i == 6)//special case Pragma<br />
										replacement = headerval.replace(/no\-cache/g, &#8220;&#8221;);<br />
								httpChannel.setResponseHeader(headers[i], replacement, false);<br />
						  	//alert(headers[i]+&#8217;='+headerval);<br />
						}catch(e){}//NS_ERROR_(header_)NOT_AVAILABLE<br />
					}<br />
    			headers = null;<br />
          return;<br />
      }<br />
  },</p>
<p>  register: function() {<br />
    var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);<br />
    observerService.addObserver(this, &#8220;http-on-examine-response&#8221;, false);<br />
  },<br />
  unregister: function() {<br />
    var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);<br />
    try{<br />
			observerService.removeObserver(this, &#8220;http-on-examine-response&#8221;);<br />
		}catch(e){}<br />
  }<br />
}<br />
//observer needs to be registered only once, so better use a XPT file<br />
window.addEventListener(&#8220;load&#8221;, function(evnt) { observer = new RespHeaderObserver(); }, true);<br />
window.addEventListener(&#8220;unload&#8221;, function(evnt) { observer.unregister(); }, true);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NettiCat</title>
		<link>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/comment-page-1/#comment-1055</link>
		<dc:creator>NettiCat</dc:creator>
		<pubDate>Fri, 18 Jan 2008 18:14:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/01/06/released-modify-headers-063/#comment-1055</guid>
		<description>P.S.

ACString getResponseHeader(in ACString header);

void setResponseHeader(in ACString header, in ACString value, in boolean merge);

http://developer.mozilla.org/en/docs/nsIHttpChannel</description>
		<content:encoded><![CDATA[<p>P.S.</p>
<p>ACString getResponseHeader(in ACString header);</p>
<p>void setResponseHeader(in ACString header, in ACString value, in boolean merge);</p>
<p><a href="http://developer.mozilla.org/en/docs/nsIHttpChannel" rel="nofollow">http://developer.mozilla.org/en/docs/nsIHttpChannel</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NettiCat</title>
		<link>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/comment-page-1/#comment-1053</link>
		<dc:creator>NettiCat</dc:creator>
		<pubDate>Fri, 18 Jan 2008 17:47:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/01/06/released-modify-headers-063/#comment-1053</guid>
		<description>Thank you! (for adding my request to the road map)</description>
		<content:encoded><![CDATA[<p>Thank you! (for adding my request to the road map)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gareth</title>
		<link>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/comment-page-1/#comment-1023</link>
		<dc:creator>gareth</dc:creator>
		<pubDate>Tue, 08 Jan 2008 17:43:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/01/06/released-modify-headers-063/#comment-1023</guid>
		<description>Hi NettiCat.  I had always thought that response headers are immutable, but I had a look at the documentation and it looks possible.  I&#039;ve added an enhancement request here: https://www.mozdev.org/bugs/show_bug.cgi?id=18455

Feel free to add yourself as a CC on this.

I have a lot of other features to add first, but I&#039;ll add this to the roadmap for version 0.8 or 0.9.</description>
		<content:encoded><![CDATA[<p>Hi NettiCat.  I had always thought that response headers are immutable, but I had a look at the documentation and it looks possible.  I&#8217;ve added an enhancement request here: <a href="https://www.mozdev.org/bugs/show_bug.cgi?id=18455" rel="nofollow">https://www.mozdev.org/bugs/show_bug.cgi?id=18455</a></p>
<p>Feel free to add yourself as a CC on this.</p>
<p>I have a lot of other features to add first, but I&#8217;ll add this to the roadmap for version 0.8 or 0.9.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NettiCat</title>
		<link>http://www.garethhunt.com/2008/01/06/released-modify-headers-063/comment-page-1/#comment-1022</link>
		<dc:creator>NettiCat</dc:creator>
		<pubDate>Tue, 08 Jan 2008 15:59:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.garethhunt.com/index.php/2008/01/06/released-modify-headers-063/#comment-1022</guid>
		<description>First reading about the &quot;Modify Headers&quot; extension I thought: That&#039;s what I &#039;m looking for.
But after installing the extension, it revealed to modify outging (request-) headers only. No possibility to modify or remove server-sided response headers. Yes, I should have read your extension-description more carefully, you mentioned it.
Ok, you may ask, why should I want to filter response headers? Answer: There are several reasons why you may want to filter server headers. One of them is to force caching in firefox.
Many servers send anti-cache headers, preventing firefox to cache documents and/or pictures, so there will always be a (full) reload when pushing the back button. That&#039;s really annoying. Anti-cache headers may be AGE, CACHE-CONTROL, EXPIRES, ETAG, PRAGMA, VARY and even more headers.
I really would appreciate adding that feature.</description>
		<content:encoded><![CDATA[<p>First reading about the &#8220;Modify Headers&#8221; extension I thought: That&#8217;s what I &#8216;m looking for.<br />
But after installing the extension, it revealed to modify outging (request-) headers only. No possibility to modify or remove server-sided response headers. Yes, I should have read your extension-description more carefully, you mentioned it.<br />
Ok, you may ask, why should I want to filter response headers? Answer: There are several reasons why you may want to filter server headers. One of them is to force caching in firefox.<br />
Many servers send anti-cache headers, preventing firefox to cache documents and/or pictures, so there will always be a (full) reload when pushing the back button. That&#8217;s really annoying. Anti-cache headers may be AGE, CACHE-CONTROL, EXPIRES, ETAG, PRAGMA, VARY and even more headers.<br />
I really would appreciate adding that feature.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
