获取HTTP头的WebKit.NET [英] Get HTTP headers on WebKit.NET

查看:1075
本文介绍了获取HTTP头的WebKit.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图找出如何处理401响应在 WebKit.NET 并显示身份验证对话框,以便用户可以输入自己的凭据,然后送他们回到服务器。

I've been trying to figure out how to handle 401 responses on WebKit.NET and show an authentication box so that user can enter his credentials and then send them back to the server.

<一个href="https://github.com/therealmitchconnors/webkitdotnet/commit/e4fba420ff9146a951eab90f9647711a727b6574"相对=nofollow>这家伙想出一个方法来正确的头添加到一个新的请求,并将它们发送到服务器,但好像code被发送到每一个网页浏览器导航到这不是我想要的。我挖了一点到code和有这个接口名为 IWebResourceLoadDelegate 除其他含有一种叫两个事件处理程序 didReceiveResponse didReceiveContentLength 将要求每一个反应,但无法弄清楚如何在世界上读取的参数头传递。我认为,头是不被传递的。

This guy figured a way to add the proper headers to a new request and send them to the server, but seems like the code is sending them to every page that the browser navigates to which is not what I want. I dug a bit into the code and there is this interface called IWebResourceLoadDelegate which among other contains two event handlers called didReceiveResponse and didReceiveContentLength that will be called for every response, but can't figure out how in the world to read the headers from the parameters being passed. I think the header is just not being passed at all.

另外,好像球员在网页工具包锐有没有解决这个问题,要么,但不知何故,Chrome浏览器做处理得当。我不知道它建造的WebKit浏览器的使用。我希望的是不是一个自定义生成这样,我不会比花我的余生试图建立的WebKit(和其他剩下的尝试添加缺少的功能)以外的其他选择。

Also, seems like the guys at web kit sharp haven't solve this issue either, but somehow Chrome does handles it properly. I'm not sure which build of WebKit Chrome uses. I just hope is not a custom build such that I won't have a choice other than spending the rest of my life trying to build WebKit (and the other rest trying to add the missing functionality).

任何人有任何想法我怎么能开始弄清楚如何处理?

Any one has any idea how could I begin to figure out how to handle this?

推荐答案

我还没有对参与这个项目的一些时间,但它看起来对我来说,你应该能够从的 WebURLResponse 对象,也许从allHeaderFields或状态code的方法。 ..

I haven't worked on this project in some time, but it looks to me like you should be able to get the request headers from the WebURLResponse object, perhaps from the allHeaderFields or statusCode methods...

这将是真正伟大的,如果你能完成我的工作,以获得完整的HTTP验证支持WebKit.NET。我只是还没有时间...... Chrome和Safari浏览器有自己专有的实现,这样的伎俩。

It would be really great if you could finish my work to get full HTTP Auth support in WebKit.NET. I just haven't had the time... Chrome and Safari have their own proprietary implementations that do the trick.

这篇关于获取HTTP头的WebKit.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆