diff --git a/js/ccnxProtocol/components/ccnxProtocolService.js b/js/ccnxProtocol/components/ccnxProtocolService.js
index b466067..0bafb5d 100644
--- a/js/ccnxProtocol/components/ccnxProtocolService.js
+++ b/js/ccnxProtocol/components/ccnxProtocolService.js
@@ -35,10 +35,6 @@
 	{
 		try {
             var trimmedSpec = aURI.spec.trim();
-            
-            // Save the mostRecentWindow from the moment of newChannel.
-    		var wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
-    		var mostRecentWindow = wm.getMostRecentWindow("navigator:browser");
     
             var contentChannel;
 			var requestContent = function(contentListener) {
@@ -71,28 +67,25 @@
                         dump("CcnxProtocol.newChannel: contentObject.content is null\n");
                         return Closure.RESULT_ERR;
                     }
-                        
-                    var content = DataUtils.toString(contentObject.content);
-                    var contentTypeEtc = getContentTypeAndCharset(contentObject.name);						
-					contentListener.onReceivedContent(content, 
-                        contentTypeEtc.contentType, contentTypeEtc.contentCharset);
-                    
-                    // Load flags bit 19 "LOAD_INITIAL_DOCUMENT_URI" means the channel is
-                    //   for the main window with the URL bar.
-                    if (contentChannel.loadFlags & (1<<19)) {
-                        // Update the URL bar.
-                        // Show the name without the ending sequence (unless the original URI had it).
-                        var urlBar = mostRecentWindow.gURLBar;
-                        if (!uriEndsWithSequence && endsWithSequence(contentObject.name)) {
-                            var nameWithoutSequence = new Name
-                                (contentObject.name.components.slice
-                                 (0, contentObject.name.components.length - 1));
-                            urlBar.value = "ccnx:" + nameWithoutSequence.to_uri();
-                        }
-                        else
-                            urlBar.value = "ccnx:" + contentObject.name.to_uri();
+
+                    // Get the URI from the ContentObject including the version.
+                    var contentUriSpec;
+                    if (!uriEndsWithSequence && endsWithSequence(contentObject.name)) {
+                        var nameWithoutSequence = new Name
+                            (contentObject.name.components.slice
+                             (0, contentObject.name.components.length - 1));
+                        contentUriSpec = "ccnx:" + nameWithoutSequence.to_uri();
                     }
+                    else
+                        contentUriSpec = "ccnx:" + contentObject.name.to_uri();
+
+                    var content = DataUtils.toString(contentObject.content);
+                    var contentTypeEtc = getContentTypeAndCharset(contentObject.name);
                     
+                    var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
+					contentListener.onReceivedContent(content, 
+                        contentTypeEtc.contentType, contentTypeEtc.contentCharset, 
+                        ioService.newURI(contentUriSpec, aURI.originCharset, null));                    
                     return Closure.RESULT_OK;
 				};
 			
diff --git a/js/ccnxProtocol/modules/ContentChannel.jsm b/js/ccnxProtocol/modules/ContentChannel.jsm
index 12badcf..d675c2f 100644
--- a/js/ccnxProtocol/modules/ContentChannel.jsm
+++ b/js/ccnxProtocol/modules/ContentChannel.jsm
@@ -11,10 +11,8 @@
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
   
-/** Create an nsIChannel where asyncOpen calls requestContent(contentListener).  When the content
-	is available, call contentListener.onReceivedContent(content, contentType, contentCharset),  
-    which sends the content	to the listener passed to asyncOpen and returns after calling its
-    onStopRequest.
+/* Create an nsIChannel for returning content to the caller of asyncOpen. 
+ * For requestContent detail, see asyncOpen.
  */
 function ContentChannel(uri, requestContent) {
 	this.requestContent = requestContent;
@@ -36,6 +34,10 @@
 	this.owner = null;
 	this.notificationCallback = null;
 	this.securityInfo = null;
+            
+    // Save the mostRecentWindow from the moment of creating the channel.
+    var wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
+    this.mostRecentWindow = wm.getMostRecentWindow("navigator:browser");
 }
 
 ContentChannel.prototype = {
@@ -71,45 +73,61 @@
 	
 	open: function() {
 		throw Cr.NS_ERROR_NOT_IMPLEMENTED;
-	},
-	
-	asyncOpen: function(aListener, aContext) {
-        try {
-            var thisContentChannel = this;
-            
-    		var threadManager = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager);
-			var callingThread = threadManager.currentThread; 
-            
-            var contentListener = {
-                onReceivedContent : function(content, contentType, contentCharset) {
-                    thisContentChannel.contentLength = content.length;
-                    thisContentChannel.contentType = contentType;
-                    thisContentChannel.contentCharset = contentCharset;
-				
-                    var pipe = Cc["@mozilla.org/pipe;1"].createInstance(Ci.nsIPipe);
-                    pipe.init(true, true, 0, 0, null);
-                    pipe.outputStream.write(content, content.length);
-                    pipe.outputStream.close();
-				
-                    // nsIChannel requires us to call aListener on its calling thread.
-                    // Set dispatch flags to 1 to wait for it to finish.
-					callingThread.dispatch({
-						run: function() { 				
-                            aListener.onStartRequest(thisContentChannel, aContext);
-                            aListener.onDataAvailable(thisContentChannel, aContext, 
-                                pipe.inputStream, 0, content.length);
-				
-                            thisContentChannel.done = true;
-                            aListener.onStopRequest(thisContentChannel, aContext, 
-                                thisContentChannel.status);
-						}
-					}, 1);
-                }
-            };
-		
-            this.requestContent(contentListener);
-        } catch (ex) {
-            dump("ContentChannel.asyncOpen exception: " + ex + "\n");
-        }
 	}
 };
+
+/*  Call requestContent(contentListener).  When the content is available, you should call 
+ *  contentListener.onReceivedContent(content, contentType, contentCharset, uri), 
+ *  which sends the content	aListener.  If uri is not null, update this.URI and if this.loadFlags
+ *  LOAD_INITIAL_DOCUMENT_URI bit is set, then update the URL bar of the mostRecentWindow.
+ *  (Note that the caller of asyncOpen sets this.loadFlags.)
+ */
+ContentChannel.prototype.asyncOpen = function(aListener, aContext) {
+    try {
+        var thisContentChannel = this;
+            
+		var threadManager = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager);
+		var callingThread = threadManager.currentThread; 
+            
+        var contentListener = {
+            onReceivedContent : function(content, contentType, contentCharset, uri) {
+                if (uri)
+                    thisContentChannel.URI = uri;
+                thisContentChannel.contentLength = content.length;
+                thisContentChannel.contentType = contentType;
+                thisContentChannel.contentCharset = contentCharset;
+				
+                var pipe = Cc["@mozilla.org/pipe;1"].createInstance(Ci.nsIPipe);
+                pipe.init(true, true, 0, 0, null);
+                pipe.outputStream.write(content, content.length);
+                pipe.outputStream.close();
+				
+                // nsIChannel requires us to call aListener on its calling thread.
+                // Set dispatch flags to 0 to return immediately.
+				callingThread.dispatch({
+					run: function() { 				
+                        aListener.onStartRequest(thisContentChannel, aContext);
+                        // Load flags bit 19 "LOAD_INITIAL_DOCUMENT_URI" means this channel is
+                        //   for the main window with the URL bar.
+                        if (uri && thisContentChannel.loadFlags & (1<<19))
+                            // aListener.onStartRequest may set the URL bar but now we update it.
+                            thisContentChannel.mostRecentWindow.gURLBar.value = 
+                                thisContentChannel.URI.spec;
+                        
+                        aListener.onDataAvailable(thisContentChannel, aContext, 
+                            pipe.inputStream, 0, content.length);
+				
+                        thisContentChannel.done = true;
+                        aListener.onStopRequest(thisContentChannel, aContext, 
+                            thisContentChannel.status);
+					}
+				}, 0);
+            }
+        };
+		
+        this.requestContent(contentListener);
+    } catch (ex) {
+        dump("ContentChannel.asyncOpen exception: " + ex + "\n");
+    }
+};
+
