Project

General

Profile

Actions

Defect #5939

closed

Atom entry URL doesn't contain port

Added by Kirill Vasiliev almost 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Feeds
Target version:
-
Start date:
2010-07-22
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

Host name in settings set to <ip-address>:3000, but all ATOM entries has URLs without ports.
It works if I change code as follows:


Index: app/views/common/feed.atom.rxml
===================================================================
--- app/views/common/feed.atom.rxml     (revision 3810)
+++ app/views/common/feed.atom.rxml     (working copy)
@@ -1,4 +1,7 @@
 xml.instruct!
+
+server_port = 3000
+
 xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
   xml.title   truncate_single_line(@title, :length => 100)
   xml.link    "rel" => "self", "href" => url_for(params.merge(:only_path => false))
@@ -9,7 +12,7 @@
   xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
   @items.each do |item|
     xml.entry do
-      url = url_for(item.event_url(:only_path => false))
+      url = url_for(item.event_url(:only_path => false, :port => server_port))
       if @project
         xml.title truncate_single_line(item.event_title, :length => 100)
       else

ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
Rails 2.3.5
Redmine 0.9.4.stable.3810 (SQLite)

Actions

Also available in: Atom PDF