Christian wrote:
Dear List,
since I have not found any traces of discussion on this list about this topic I dare to ask where to place code handling basic authentication in dillo's source? As I see it the cache module is responsible for handling server responses. So I would at a first try add the code there. How can I connect to a UI dialog from here to get the necessary credentials? Maybe a possible solution looks like this:
- react to 403 header and look for Authorization request - if there is one ask the user for username/pass + resend the request with the Authorisation header added + or display the 403 if the user aborts
What do you think? I will come up with some example code to illustrate the idea in case this is not very clear.
(We'll see what Jorge has to say, but...) cache.c seems like the right place to me, with a dialog called by way of uicmd.cc. The auth data would be stored away somewhere (a new file?), which a_Http_make_query_str() could call like it calls a_Cookies_get_query().