| Summary: | non-existent URLs listed in the "Layer index URL" column | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | Belen Barros Pena <belen.barros.pena> |
| Component: | toaster | Assignee: | Elliot Smith <elliot.smith> |
| Status: | VERIFIED OBSOLETE | QA Contact: | Alexandru Roman <alexandru.costinx.roman> |
| Severity: | minor | ||
| Priority: | Medium | CC: | alexandru.costinx.roman, alexandru.damian, belen.barros.pena, bluelightning, jessica.zhang |
| Version: | 1.5 | ||
| Target Milestone: | Future | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | simple | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Belen Barros Pena
2013-09-13 14:20:43 UTC
webhob-poky/master:aa7bec2e9dffd6901ebe3accf748ce458d1481a3 The layers don't have URLs specified anywhere. So it's a guessed URL. Not sure what options we have here. Well, I guess we should be checking for a 404 before displaying the URL, bearing in mind that we cannot condition the display of other content in the page to obtaining a response. I am cc'ing PaulE: hopefully he has some suggestions for us. Generally speaking, the way to do this would be a XMLHttpRequest. Unfortunately, cross origin requests using XMLHttpRequest are being denied by the browser under the Same Origin Policy. This means that we can't check if the target link is a 404 at runtime. Maybe we can solve this in the layerindex application in the presentation level, i.e. a nicer 404 ? (In reply to comment #4) > Generally speaking, the way to do this would be a XMLHttpRequest. > Unfortunately, cross origin requests using XMLHttpRequest are being denied > by the browser under the Same Origin Policy. > This means that we can't check if the target link is a 404 at runtime. Cross-Origin Resource Sharing seems to be well supported http://caniuse.com/#feat=cors Is this something we could consider? If not supported by the browser, we consider the check as failed and don't provide the link. > Maybe we can solve this in the layerindex application in the presentation > level, i.e. a nicer 404 ? The alternative is not providing links to the layer index: you should not be showing non-existent URLs to people. The issue I have is that right now this is about the layer index, but the idea is to integrate our web tools (that's why we are moving to this platform), and in order to do so effectively we need to be able to solve this problem. If the layerindex server sends back the header ''Access-Control-Allow-Origin: *' I can verify non-404 of the destination URL and not show invalid links. (In reply to comment #6) > If the layerindex server sends back the header > > ''Access-Control-Allow-Origin: *' > > I can verify non-404 of the destination URL and not show invalid links. Sounds good :) Now we just need Paul / Michael to confirm if the server can be set up that way. Moved to WaitForUpstream until the layer index application supports this functionality. I'm confused - why do we need the browser to do this via an XMLHttpRequest? Why not just do it on the server side as we're sending the page to the user? Conceptually, this is a presentation issue, so it should be solved at the presentation layer. Generally speaking, I am totally against implementing this policy, because: * it drives up the load on the layer-index application, getting lots of hits for content that is not seen by a user * it raises a privacy problem, as the system will make external network calls to a 3rd party web application without user consent; The privacy issue would be alleviated somewhat if the calls are made through a system where there is reasonable expectations of such calls happening, i.e. a browser, instead making calls from the backend itself. Maybe we should handle this problem somehow else, like embedding URLs into layer git branch descriptions ? As we now show the layer index directly, we don't need the layer index URL any more (the user used to be able to visit the URL to get more info. about the layer). Verified. |