0

I have a NPAPI Plugin (Windows/Win32) that downloads a zip file from the server. It does not work if the client in behind a proxy. How would I get the proxy credentials from the user through my NPAPI Plugin? I used HttpQueryInfo to detect presence of proxy by querying its status. If "407" is returned i use InternetErrorDlg to get credentials from the user but Chrome(29.0.1547.66 m) crashes on encountering the line. FF(19.0.2) works good.

Are there any more ways to do this ? Prompt the user to enter proxy credentials? Any help in this regard will greatly be appreciated.

With Lots of Thanks, LazyCoder7.

4

1 回答 1

1

如果您使用浏览器 API 下载,那么代理应该只是工作(tm)。您这样做的方式可能会使用NPN_GetValueForURL在较新的浏览器上获取代理信息;除非您需要记住不允许阻塞主线程,这可能是您正在做的事情导致它崩溃。使用 HTML 或其他东西获取凭据,然后将它们传入;只要您使用另一个线程并且小心,就可以使用 Windows 对话框来执行此操作,但是在 javascript/html 中处理它要容易得多。

于 2013-09-06T04:49:53.950 回答