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.
If you use the browser APIs to download then the proxy should Just Work(tm). The way you're doing it you can probably use NPN_GetValueForURL to get proxy information on newer browsers; barring that you need to remember that you aren't allowed to block the main thread, which is probably what you're doing that causes it to crash. Get the credentials using HTML or something and then pass them in; it is possible to use windows dialogs to do it as long as you use another thread and are careful, but it's much easier to handle it in javascript/html.