Re: Lifecycle for custom NSURLProtocol properties

2016-09-27 Thread Jens Alfke
> On Sep 26, 2016, at 10:42 PM, Allan Odgaard > wrote: > > I am making use of NSURLProtocol’s `setProperty:forKey:inRequest:` but it > seems that my custom properties outlive the URL request, and even if I > explicitly call `removePropertyForKey:inRequest:` after

Lifecycle for custom NSURLProtocol properties

2016-09-26 Thread Allan Odgaard
I am making use of NSURLProtocol’s `setProperty:forKey:inRequest:` but it seems that my custom properties outlive the URL request, and even if I explicitly call `removePropertyForKey:inRequest:` after my request is done, it would appear that my properties are still being retained by something.

Re: NSURLProtocol

2015-04-13 Thread Mike Abdullah
Yes, but it’s up to WebKit how it decides to handle the content of the page, and what it agrees to hand off to NSURLProtocol. Perhaps most importantly, the webkit list has more WebKit engineers monitoring it; you’re more likely to get a decent response. On 13 Apr 2015, at 18:37, danchik danc

Re: NSURLProtocol

2015-04-13 Thread danchik
question has nothing to do with webkit, the NSURLProtocol is part of foundation library, the fact that it is implemented inside a plugin, and can also be instanciated inside a webview, does not make it a webkit question. On Apr 12, 2015, at 2:30 AM, Mike Abdullah mabdul...@karelia.com wrote

Re: NSURLProtocol

2015-04-12 Thread danchik
encapsulation and I should use something other than NSURLProtocol? or third, fourth, etc option here :) On Apr 11, 2015, at 10:09 PM, David Grant dmgr...@infinitydigital.com wrote: Ok, so my personal knowledge stops at the point at which you create a new protocol, with the exception

Re: NSURLProtocol

2015-04-12 Thread Mike Abdullah
On 12 Apr 2015, at 04:07, danchik danc...@rebelbase.com wrote: an npapi plugin on a web page, it registers a protocol handler I’d say you’re on the wrong list then. This comes down almost entirely to what has been implemented/allowed for Safari, rather than being a general Cocoa question.

Re: NSURLProtocol

2015-04-11 Thread Mike Abdullah
On 11 Apr 2015, at 02:28, Dan S danc...@rebelbase.com wrote: Is behavior of NSURLProtocol changed with Safari 5.1? I have a plugin that registeres a protocol handler xyz:// for example Could clarify what exactly you mean by “plugin” here? It succeeds and I can see all the requests

Re: NSURLProtocol

2015-04-11 Thread Dan S
the page and creates my plugin (I know that because I can step into it :)), at which point the plugin immediately registered a new protocol 'xyz://' with NSURLProtocol, and result of registration is always YES. But it works in Safari 5.1 but NOT in Safari 5.1.10 Here are more details: On that page

Re: NSURLProtocol

2015-04-11 Thread danchik
an npapi plugin on a web page, it registers a protocol handler On Apr 11, 2015, at 2:26 AM, Mike Abdullah mabdul...@karelia.com wrote: On 11 Apr 2015, at 02:28, Dan S danc...@rebelbase.com wrote: Is behavior of NSURLProtocol changed with Safari 5.1? I have a plugin that registeres

NSURLProtocol

2015-04-10 Thread Dan S
Is behavior of NSURLProtocol changed with Safari 5.1? I have a plugin that registeres a protocol handler xyz:// for example It succeeds and I can see all the requests to files on web pages being consulted with the object via +(BOOL) canInitWithRequest:(NSUrlRequest): With Safari 5.0 I would

Can't get first try of NSURLProtocol subclass to work.

2014-10-20 Thread Daryle Walker
I entered a URL that triggers my handler, but I get this from the Xcode debug log: 2014-10-20 07:42:08.968 MyApp[94134:303] *** Assertion failure in -[NSWindow setTitle:], /SourceCache/AppKit/AppKit-1265.21/AppKit.subproj/NSWindow.m:2901 2014-10-20 07:42:08.972 MyApp[94134:303] *** WebKit

Re: Why are properties access through NSURLProtocol class method rather than NSURLRequest instance method?

2011-05-16 Thread Mike Abdullah
On 16 May 2011, at 03:57, Larry Campbell wrote: Seems odd to me that setting and getting properties of an NSURLRequest involve an NSURLProtocol class method: +[NSURLProtocol setProperty:forKey:inRequest:] rather than what seems to me the much more straightforward

Why are properties access through NSURLProtocol class method rather than NSURLRequest instance method?

2011-05-15 Thread Larry Campbell
Seems odd to me that setting and getting properties of an NSURLRequest involve an NSURLProtocol class method: +[NSURLProtocol setProperty:forKey:inRequest:] rather than what seems to me the much more straightforward: -[NSMutableURLRequest setProperty:forKey:] Is there a reason

WebView NSURLProtocol Tiger problems.

2010-11-04 Thread Mr. Gecko
For some reason, on tiger, when you make your own protocol using NSURLProtocol and respond with URLProtocol:wasRedirectedToRequest:redirectResponse:redirectResponse to a WebView, it just doesn't redirect at all. Is this a known bug? Do I have to write a web server to redirect someone

Re: WebView NSURLProtocol Tiger problems.

2010-11-04 Thread Mr. Gecko
]; [request release]; [response release]; } On Nov 4, 2010, at 10:55 AM, Mr. Gecko wrote: For some reason, on tiger, when you make your own protocol using NSURLProtocol and respond with URLProtocol:wasRedirectedToRequest:redirectResponse:redirectResponse to a WebView

Subclass NSURLProtocol, and file /Developer/Examples/WebKit/PictureBrowser/

2010-10-28 Thread Wayne Shao
Hi, I tried to find an example of subclassing NSURLProtocol. Some web forums points to /Developer/Examples/WebKit/PictureBrowser/, which is not on my system. How do I install that? Or is there another similar example? -- W. Shao ___ Cocoa-dev

Re: Custom NSURLProtocol crashes when using Garbage Collection

2009-10-20 Thread Keith Duncan
At this point I expect there's a GC bug in the NSURLProtocol machinery, specifically the bridge between NSURLProtocol and CFURLProtocol. We'll look further in 7314551. Thanks for checking for me, I was holding out on hope that there was actually bug in my code so that I could still get

Custom NSURLProtocol crashes when using Garbage Collection

2009-10-19 Thread Keith Duncan
I wrote a simple NSURLProtocol subclass and started observing crashes in URL Loading code. I've extracted the crasher into a simple test project which loads an image from a URL with custom scheme which I handle every hundredth of a second. When compiled with -fobjc-gc it reliably crashes

Re: Custom NSURLProtocol crashes when using Garbage Collection

2009-10-19 Thread Greg Parker
On Oct 19, 2009, at 2:16 AM, Keith Duncan wrote: I wrote a simple NSURLProtocol subclass and started observing crashes in URL Loading code. I've extracted the crasher into a simple test project which loads an image from a URL with custom scheme which I handle every hundredth of a second