<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>5192</bug_id>
          
          <creation_ts>2013-09-13 14:20:43 +0000</creation_ts>
          <short_desc>non-existent URLs listed in the &quot;Layer index URL&quot; column</short_desc>
          <delta_ts>2015-12-04 14:01:31 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>1.5</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>simple</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Belen Barros Pena">belen.barros.pena</reporter>
          <assigned_to name="Elliot Smith">elliot.smith</assigned_to>
          <cc>alexandru.costinx.roman</cc>
    
    <cc>alexandru.damian</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>bluelightning</cc>
    
    <cc>jessica.zhang</cc>
          
          <qa_contact name="Alexandru Roman">alexandru.costinx.roman</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>36690</commentid>
    <comment_count>0</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2013-09-13 14:20:43 +0000</bug_when>
    <thetext>In the &quot;All layers&quot; table, we are not checking if the &quot;Layer Index URL&quot; exists.  For example: 

http://layers.openembedded.org/layerindex/branch/master/layer/meta-hob/ 

returns 404, because the meta-hob layer is not in the OpenEmbedded metadata index. 

We might not have to fix this right now, but the interface should not list URLs that return 404.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36704</commentid>
    <comment_count>1</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2013-09-13 14:43:00 +0000</bug_when>
    <thetext>webhob-poky/master:aa7bec2e9dffd6901ebe3accf748ce458d1481a3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37576</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2013-10-03 15:21:58 +0000</bug_when>
    <thetext>The layers don&apos;t have URLs specified anywhere. So it&apos;s a guessed URL.

Not sure what options we have here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37617</commentid>
    <comment_count>3</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2013-10-04 11:17:35 +0000</bug_when>
    <thetext>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&apos;ing PaulE: hopefully he has some suggestions for us.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37622</commentid>
    <comment_count>4</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2013-10-04 13:14:10 +0000</bug_when>
    <thetext>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&apos;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 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37630</commentid>
    <comment_count>5</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2013-10-04 14:17:51 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; Generally speaking, the way to do this would be a XMLHttpRequest.
&gt; Unfortunately, cross origin requests using XMLHttpRequest are being denied
&gt; by the browser under the Same Origin Policy. 
&gt; This means that we can&apos;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&apos;t provide the link.

&gt; Maybe we can solve this in the layerindex application in the presentation
&gt; 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&apos;s why we are moving to this platform), and in order to do so effectively we need to be able to solve this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37634</commentid>
    <comment_count>6</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2013-10-04 15:04:35 +0000</bug_when>
    <thetext>If the layerindex server sends back the header

&apos;&apos;Access-Control-Allow-Origin: *&apos;

I can verify non-404 of the destination URL and not show invalid links.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37638</commentid>
    <comment_count>7</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2013-10-04 15:28:32 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; If the layerindex server sends back the header
&gt; 
&gt; &apos;&apos;Access-Control-Allow-Origin: *&apos;
&gt; 
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39214</commentid>
    <comment_count>8</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2013-12-03 18:55:25 +0000</bug_when>
    <thetext>Moved to WaitForUpstream until the layer index application supports this functionality.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39223</commentid>
    <comment_count>9</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-12-04 11:35:27 +0000</bug_when>
    <thetext>I&apos;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&apos;re sending the page to the user?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39237</commentid>
    <comment_count>10</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2013-12-05 11:10:26 +0000</bug_when>
    <thetext>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 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53623</commentid>
    <comment_count>11</comment_count>
    <who name="Elliot Smith">elliot.smith</who>
    <bug_when>2015-09-02 11:15:42 +0000</bug_when>
    <thetext>As we now show the layer index directly, we don&apos;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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57047</commentid>
    <comment_count>12</comment_count>
    <who name="Alexandru Roman">alexandru.costinx.roman</who>
    <bug_when>2015-12-04 14:01:31 +0000</bug_when>
    <thetext>Verified.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>