<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/100814/">http://git.reviewboard.kde.org/r/100814/</a>
     </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On March 7th, 2011, 6:26 p.m., <b>David Faure</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/100814/diff/1/?file=10681#file10681line124" style="color: black; font-weight: bold; text-decoration: underline;">kparts/browserrun.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void BrowserRun::scanFile()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">124</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">  <span class="k">const</span> <span class="n">QString</span> <span class="n">protocol</span> <span class="o">=</span> <span class="n">KProtocolManager</span><span class="o">::</span><span class="n">slaveProtocol</span><span class="p">(</span><span class="n">KRun</span><span class="o">::</span><span class="n">url</span><span class="p">(),</span> <span class="n">dummy</span><span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">For speed reasons, we could do the proxy-determination (which is what slaveProtocol does) only for protocols (such as FTP) where the proxy is a different protocol (such as HTTP).

findProtocol in kprotocolmanager.cpp shows us how: with a 
if (!KProtocolInfo::proxiedBy(url.protocol()).isEmpty()) {} around the call to slaveProtocol.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I should have tested my changes before I committed, but doing this unfortunately does not work because proxiedBy always returns true since ftp.protocol no longer contains a "ProxiedBy=" entry. I guess that was done when the ftp protocol started supporting ftp proxies ??? Anyhow, the speed should not be much of an issue since KProtocolManager::slaveProtocol does caching.</pre>
<br />




<p>- Dawit</p>


<br />
<p>On March 8th, 2011, 12:43 a.m., Dawit Alemayehu wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for kdelibs.</div>
<div>By Dawit Alemayehu.</div>


<p style="color: grey;"><i>Updated March 8, 2011, 12:43 a.m.</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The attached patch fixes accessing FTP sites through HTTP proxy servers for KDE based browsers, such as Konqueror, only. Why only browsers ? Because FTP over HTTP proxy sends back HTML pages and not file items. As such, the returned result cannot be shown in Dolphin or any application or dialog that relies on the dolphin part.

There is however a much larger issue here that this patch does not address. How to support connections to FTP sites in all apps/dialogs that use the dolphinpart when such requests are routed through an HTTP proxy ? There is a possibility of using proxy tunneling like it is done for HTTPS over HTTP proxy. However, that would require kio_ftp being changed to support connecting to an HTTP proxy server. Not a minor change. The other option I can think of is to modify the dolphinpart to parse the HTML file returned in such cases and create file items out of them, but that too is not a complicated solution.

Anyhow, regardless of what could or could not be done to resolve that issue in the future, I think that the dolphinpart should at least should check to see if the ftp request is going over proxy (KProtocolManager::slaveProtocol) and inform the user such action is not supported.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Used Konqueror to connect to FTP sites through a local proxy server.</pre>
  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=236630">236630</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kioslave/http/http.cpp <span style="color: grey">(0579382)</span></li>

 <li>kparts/browserrun.cpp <span style="color: grey">(3a062d2)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/100814/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>