Closed Bug 756317 Opened 12 years ago Closed 12 years ago

Webapp.domain_from_url does not respect port

Categories

(Marketplace Graveyard :: Code Quality, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2012-06-21

People

(Reporter: cvan, Assigned: robhudson)

References

()

Details

Webapp.domain_from_url strips the port (https://github.com/mozilla/zamboni/blob/master/mkt/webapps/models.py#L164) and gives us only the hostname: In [1]: Webapp.domain_from_url('http://localhost') Out[1]: 'localhost' In [2]: Webapp.domain_from_url('http://localhost:9000') Out[2]: 'localhost' This means if you have submitted an app to the Marketplace at https://cbc.ca/manifest.webapp then you will not be able to submit a manifest for https://cbc.ca:8080/manifest.webapp
From email: Origin is defined in the manifest spec as: <protocol>://<name>:<port> Therefore for the purposes of apps, domain.com:8080 should be a different app from domain.com; and https://domain.com should also be treated as a separate app from http://domain.com
Priority: -- → P2
Sounds like keeping everything up to the and including the port might be optimal, like the following... >>> Webapp.domain_from_url('http://localhost/path/to/manifest.webapp') 'http://localhost' >>> Webapp.domain_from_url('https://localhost:8080/path/to/manifest.webapp') 'https://localhost:8080' If we stored all that it would provide unique matches taking protocol, name, and port into account.
Assignee: nobody → robhudson.mozbugs
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2012-06-21
You need to log in before you can comment on or make changes to this bug.