I'm going to try and use the WebKit source to make it do what I need it to do.

On Dec 29, 2008, at 6:46 PM, Mike Abdullah wrote:

The WebResourceLoadDelegate will notify you when it receives a URL response. That response should be of the NSHTTPURLResponse class and the -allHeaderFields method should allow you to access its setcookie header. You can choose to do what you like with that header, presumably placing it into your cookie storage.

On 29 Dec 2008, at 23:28, Mr. Gecko wrote:

so your saying to make it set up the cookies headers for the NSURLRequest?
if I do that, how can I get the setcookie header from the server?

On Dec 29, 2008, at 5:25 PM, Mike Abdullah wrote:

The system really isn't designed for this sort of thing sadly : ( How about instead, setting up a WebResourceLoadDelegate to modify all outgoing URL requests doing:

[aRequest setHTTPShouldHandleCookies:NO]

You can then again use the WebResourceLoadDelegate methods to receive the URL response and handle the cookie from it as you'd like.

Mike.

On 29 Dec 2008, at 17:17, Mr. Gecko wrote:

Well I'm not wanting to use the default cookie system because I'm trying to make a secure browser which wont save the cookies and would reset the cookies if inactive and so on so forth. I did some more tests and tried to do poseAsClass in the main and I get this message in the debug output objc[87202]: MYHTTPCookieStorage: [MYHTTPCookieStorage poseAs:NSHTTPCookieStorage]: target not immediate superclass

I don't know what that means, because I'm using NSObject as the superclass. Do I have to use NSHTTPCookieStorage as the superclass?
This is how my main looks like.
#import <Cocoa/Cocoa.h>
#import "MYHTTPCookieStorage.h"

int main(int argc, char *argv[])
{
[[MYHTTPCookieStorage class] poseAsClass:[NSHTTPCookieStorage class]];
    return NSApplicationMain(argc, (const char **) argv);
}

Thanks for the help,
Mr. Gecko

On Dec 29, 2008, at 10:57 AM, Mike Abdullah wrote:

Perhaps you could explain why you've felt the need to write a custom cookie storage system? I think it would help us figure the best solution. Bear in mind that NSHTTPCookieStorage's design is quite complicated in that it synchronises with all instances in other apps.

Mike.

On 29 Dec 2008, at 01:52, Mr. Gecko wrote:

Hello, I'm trying to make my own cookie storage system for WebView and to do that I've found that I need to override NSHTTPCookieStorage but when I do that how can I make webview use my overridden one? I've already wrote the cookie system, following the rules of cookie security and all, I just need to get this working...

Thanks for the help,
Mr. Gecko
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net

This email sent to cocoa...@mikeabdullah.net






_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to