Get HTTP headers on WebKit.NET

I tried to figure out how to handle 401 responses to WebKit.NETand show an authentication window so that the user can enter their credentials and then send them back to the server.

This guy figured out a way to add the appropriate headers to the new request and send them to the server, but the code seems to send them to every page the browser translates to, which I don't want. I dug into the code a bit, and there is this interface called IWebResourceLoadDelegate, which among others contains two event handlers, called didReceiveResponseand didReceiveContentLength, which will be called for each answer, but they cannot understand how in the world to read the headers from the parameters passed. I think the title is simply not being transmitted at all.

Also, it seems like the guys at the website cannot solve this problem, but somehow Chrome is dealing with it properly. I'm not sure which version uses WebKit Chrome. I just hope this is not an ordinary build, so I will have no choice but to spend the rest of my life trying to create WebKit (and the other is trying to add the missing functionality).

Anyone have an idea how I can start figuring out how to do this?

+2
source share
1 answer

I have not worked on this project for some time, but it seems to me that you should get request headers from WebURLResponse , possibly from allHeaderFields or statusCode methods ...

, , HTTP Auth WebKit.NET. ... Chrome Safari , .

+1

All Articles