<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>How about extend the dataprovider API to include the features that Max is adding?</div><div><br></div><div>Though I still don't understand exactly what he's doing with media. Should media *ever* be proxied? I don't think so, given that transcoding is no longer useful -- really, we should deprecate that altogether -- and the browser can load media from remote sites.</div><div><br></div><div>Under what circumstances should media be proxied?</div><br><div><div>On May 29, 2008, at 12:36 PM, Henry Minsky wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">For data requests, the DataProvider API currently does not currently have<br>any method to set the proxy server URL explicitly, but I would like to add such a feature. <br><br>The current default system data provider is an instance of LzHTTPDataProvider, which uses <br> instances of LzHTTPDataRequest to encapsulate requests. <br><br>Currently the way it works is when a data request is made, LzDataset builds a HTTPDataRequest object<br>and passes it to the default data provider via the doRequest() methods.<br> <br><br>So if we add a new "proxyhost" property to nodes (or if that is too broad, to LzView and to LzDataset), then if there is a proxyhost property set on the dataset, it will get stuck into the HTTPDataRequest, and then LzHTTPDataProvider can use that value. If it is not set, then <br> the proxy host will default to the current behavior of using the application's own URL as the proxy server address.<br><br><br><br><div class="gmail_quote">On Thu, May 29, 2008 at 3:22 PM, Henry Minsky <<a href="mailto:henry.minsky@gmail.com">henry.minsky@gmail.com</a>> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I think the intention is that this applies to not just data but to media loading as well, which is outside the scope of the<br> DataProvider API. <br><div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Thu, May 29, 2008 at 3:07 PM, David Temkin <<a href="mailto:temkin@laszlosystems.com" target="_blank">temkin@laszlosystems.com</a>> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Max, Henry,<br> <br> Can this be solved using the existing mechanism of a custom dataprovider, which could implement a proxy policy? That was one intention of the dataprovider API.<br> <br> Better to do this in one place, as opposed to adding a new API for this.<br><font color="#888888"> <br> - D.</font><div><div></div><div><br> <br> <br> On May 28, 2008, at 4:43 PM, Max Carlson wrote:<br> <br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Sounds good to me! By the way, I filed a bug to track the proxy policy API change: <a href="http://jira.openlaszlo.org/jira/browse/LPP-6058" target="_blank">http://jira.openlaszlo.org/jira/browse/LPP-6058</a><br> <br> Can you file one for doing the same with the proxyhost attribute? Thanks!<br> <br> Henry Minsky wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> A related issue, it would be nice to be able to specify the URL of the proxy host, instead of it being<br> hardcoded to be the app url. How about a proxyhost attribute that you can set in a similar manner?<br> On Wed, May 28, 2008 at 3:00 PM, Max Carlson <<a href="mailto:max@openlaszlo.org" target="_blank">max@openlaszlo.org</a> <mailto:<a href="mailto:max@openlaszlo.org" target="_blank">max@openlaszlo.org</a>>> wrote:<br> Hi Folks,<br> I was thinking of deprecating the LzView.add/removeProxyPolicy()<br> APIs in favor of a new, simpler system. The current API looks like<br> this:<br> LzView.addProxyPolicy ( f )<br> Adds a function which can decide how the media at a given URL should<br> be loaded<br> @param Function f: A function that takes a URL as a string and<br> returns one of true, false, or null meaning respectively that the<br> request should be proxied by the LPS server; made directly to the<br> URL; or should be passed to the next policy function in the list.<br> The default policy function returns the value of canvas.proxied<br> LzView.removeProxyPolicy ( f )<br> Removes a proxy policy function that has been added using<br> LzView.addProxyPolicy<br> @param Function f: The function to remove from the policy list<br> @return Boolean: Returns true if the function was found and removed,<br> false<br> if not<br> Instead, each view would be able to set its own proxy policy. If a<br> view does not have an explicit proxy policy set, it looks up the<br> parent chain until it finds one. The canvas always has a default<br> proxy policy set. Views can change their proxy policy like this:<br> anyview.setProxyPolicy ( f )<br> Sets a proxy policy function on a per-view basis.<br> @param Function f: The function to use for this view's proxy policy<br> Let me know what you think!<br> -- Regards,<br> Max Carlson<br> OpenLaszlo.org<br> -- <br> Henry Minsky<br> Software Architect<br> <a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a> <mailto:<a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a>><br> </blockquote> <br> -- <br> Regards,<br> Max Carlson<br> OpenLaszlo.org<br> </blockquote> <br> </div></div></blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a><br><br> </div></div></blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br><br></blockquote></div><br></body></html>