Closed Bug 975834 Opened 10 years ago Closed 10 years ago

homescreen bookmarks do not work for URLs ending in a file

Categories

(Firefox OS Graveyard :: Gaia::Homescreen, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.3+, b2g-v1.3 fixed, b2g-v1.3T fixed, b2g-v1.4 fixed)

RESOLVED FIXED
1.4 S2 (28feb)
blocking-b2g 1.3+
Tracking Status
b2g-v1.3 --- fixed
b2g-v1.3T --- fixed
b2g-v1.4 --- fixed

People

(Reporter: bkelly, Assigned: crdlc)

References

Details

(Keywords: regression)

Attachments

(1 file)

STR:

1) Open the following URL in your browser:

http://people.mozilla.org/~roc/virtual-list-demo.html

2) Press the favorite star at the bottom of the screen.  Save it to the homescreen.
3) Attempt to open the new homescreen icon.

Expected results:

The page opens correctly

Actual results:

Failure to load.  You can see that it is trying to open a URL with a "/" appended to the end of it.  This won't work for a URL that points at an actual file.

This occurs on my v1.4 buri:

  gecko hg:  1238ef12b996
  gaia git:  15b998c0a57e9415fd694fca2477ff1ee8e81661

I verified this works on my v1.1 helix, so this is a regression.
We should check if this happens on 1.3 as well.
Keywords: qawanted
Assignee: nobody → crdlc
Status: NEW → ASSIGNED
It happens in 1.3 as well
blocking-b2g: 1.4? → 1.3?
Regression from bug 939524
Attached file Patch v1
Attachment #8380559 - Flags: review?(jmcf)
I don't think the origin in this patch is correct.
Actually, the origin is not used in bookmarks, just the bookmarkURL and url properties. The first one is used for indexing bookmarks in homescreen and the second one is the url to open the bookmark in a wrapper. We added "/" at the end of the bookmarkURL in order to distinguish between installed apps and bookmarks. E.g. http://m.facebook.com (app) and http://m.facebook.com/ (bookmark). It was done in bug 939524, comment 13. Apps are -> origin = scheme + "://" + domain + [:port] so you should never have a trailing "/". I didn't change the this.origin in this patch so blocking the patch does not make sense in my honest opinion for this reason. Maybe if you want to set the correct origin, a new one bug could be filled to follow this discussion.
Well, that's a terrible way of distinguishing between apps and bookmarks. Why don't we just use an explicit flag? Please file a followup to clean up all that.
Filled bug 976955
blocking-b2g: 1.3? → 1.3+
Whoa, you know that http://example.com/foo is not the same URL as http://example.com/foo/ right?

Surely what distinguishes an app from a bookmark is whether it has a manifest URL, not whether it has a slash on the end of its URL? Could we store the manifest URL for this purpose? Does the homescreen app allow for multiple apps per origin?
We know distinguish between them perfectly :) but the problem is not distinguish here. The issue is that apps are indexed in the homescreen by means of origin/bookmarkURL. If we want to do it well, we have to change that code for indexing. I can study to do this in that way but the patch could be riskier thought for sure. A new bug 976955 was created to follow this implementation and to do the stuffs correctly
I have another idea, maybe no risky, I will take care of it today
Comment on attachment 8380559 [details]
Patch v1

Moving the review to Vivien because I thought that he was on PTO this week but I realized yesterday that he is working hard as usual
Attachment #8380559 - Flags: review?(jmcf) → review?(21)
No more trailing '/' anymore ;) it was a bad idea that day
Target Milestone: --- → 1.4 S2 (28feb)
Merged in master:

https://github.com/mozilla-b2g/gaia/commit/d7ceb7d56fe526116911bd906518888c71b871bd
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment on attachment 8380559 [details]
Patch v1

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #):
[User impact] if declined: URLs that finish in a file are not bookmarked
[Testing completed]: yes
[Risk to taking this patch] (and alternatives if risky): low
[String changes made]:
Attachment #8380559 - Flags: approval-gaia-v1.3?(fabrice)
Attachment #8380559 - Flags: approval-gaia-v1.3?(fabrice) → approval-gaia-v1.3+
This has conflicts on v1.3. Please rebase.
Flags: needinfo?(crdlc)
Blocks: 978739
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: