Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#20144 closed Bug (wontfix)

RSS multi-domains issue

Reported by: julyzergcn1@… Owned by: nobody
Component: contrib.syndication Version: dev
Severity: Normal Keywords:
Cc: bmispelon@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If a site has more than one domains, the rss links should use the domain that user actually used, not the one set in database.

The patch:
https://github.com/julyzergcn/django/commit/aa31a4e32470bb33106381223986577b7d948b9a#django/contrib/syndication/views.py

Change History (5)

comment:1 by Baptiste Mispelon, 11 years ago

Cc: bmispelon@… added
Resolution: invalid
Status: newclosed

get_current_site will use RequestSite if the sites framework is not installed: https://github.com/django/django/blob/master/django/contrib/sites/models.py#L95-L104

This is documented there: https://github.com/django/django/blob/master/docs/ref/contrib/syndication.txt#L130-L136

If you think this behaviour should change, consider reopening the ticket but you will need to address the backwards-compatibility issues.

comment:2 by julyzergcn1@…, 11 years ago

Resolution: invalid
Status: closednew

Hi, the issue is - if a site has more than one domain names(for example, google.cc, google.tk), and the they use the sites framework(which set google.com as the domain). UserA open a RSS feed from google.cc domain, and UserB open a RSS feed from another domain - google.tk. UserA should get the RSS domain is google.cc but he get google.com. UserB should get the RSS domain(google.tk) he actually use but he get google.com.
The domain confilct issue will cause some RSS readers failded to parse and update feeding.

So I think we can just only use the RequestSite rather than get_current_site(), even if the sites framework is used.

comment:3 by Jacob, 11 years ago

Resolution: wontfix
Status: newclosed

If you're using multiple domains, then you need multiple sites, one for each domain. Your fix introduces some other problems around determining domains, so it's really a design question, and the design here is that if you have multiple domains then you need multiple sites.

comment:4 by julyzergcn1@…, 11 years ago

I don't think I need multiple sites. In my opinion, sites is for sharing some database data between multiple projects, but that's not really my needs. I have only one project, but with two domains. Maybe you donot understand me needs. I truely think of it's the issue of django itself.
Now my plan to resolve the issue is to rewrite the Feed class.
It seems you are not interested in these kind of small things. I will not reopen this ticket.
Thanks all the same.

comment:5 by Aymeric Augustin, 11 years ago

The developers of Django made a design choice to handle multiple domains.

Your opinion differs. That's fine, and you can rewrite things differently. Django is quite modular and allows people with strong opinions to rewrite the bits they don't like :) That's your choice and your freedom.

The Django community is interested in fixing all issues, no matter how small or large they are. However, it isn't possible to change arbitrarily a behavior thousands of users are relying upon. For instance the change you propose would break sites hosted behind a reverse proxy that strips the Host header.

Note: See TracTickets for help on using tickets.
Back to Top