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)
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
Comment 1•12 years ago
|
||
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
Assignee | ||
Comment 2•12 years ago
|
||
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 | ||
Updated•12 years ago
|
Assignee: nobody → robhudson.mozbugs
Assignee | ||
Comment 3•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•12 years ago
|
Target Milestone: --- → 2012-06-21
You need to log in
before you can comment on or make changes to this bug.
Description
•