00:07:54 Pipian__ has quit (Quit: Pipian__) 01:03:19 hmm rszeno it seems we already do isExtension check for XPConnect 01:06:18 everywhere I see 01:06:19 if (!(typeof tabulator != 'undefined' && tabulator.isExtension)) 01:06:29 $rdf.Util.enablePrivilege("UniversalXPConnect") 01:11:12 in 3.5 was some changes and seems this doesn't work 01:11:56 i make it work by changeing settings in prefs.js 01:16:58 maybe is useful http://pastebin.com/8WhnaxUv 01:18:33 in first link is a solution given by alien51, last two talk about user_pref in prefs.js 01:51:36 tlr has quit (Quit: tlr) 05:39:43 presbrey has quit (Quit: Terminated with extreme prejudice - dircproxy 1.2.0) 08:11:02 bblfish (~bblfish@AAubervilliers-651-1-342-31.w83-114.abo.wanadoo.fr) has joined #dig 08:45:03 bblfish has quit (Quit: bblfish) 08:46:18 bblfish (~bblfish@ALagny-551-1-33-93.w90-3.abo.wanadoo.fr) has joined #dig 09:06:59 timbl (~timbl@host109-156-61-106.range109-156.btcentralplus.com) has joined #dig 09:39:01 timbl has quit (Quit: timbl) 09:54:47 melvster (~melvin@p4FF97358.dip.t-dialin.net) has joined #dig 10:22:51 danbri has quit (Ping timeout: 252 seconds) 10:39:27 tlr (~tlr@ip-88-207-233-25.dyn.luxdsl.pt.lu) has joined #dig 10:43:55 danbri (~danbri@cable-146-255-156-245.dynamic.telemach.ba) has joined #dig 11:13:26 ok, so there is one good reason to use pure HTTP Proxy though 11:13:53 and that is that the semantics of a pure HTTP Proxy are much clearer 11:14:10 ie: I don't have to change the URLs of the document 11:14:27 or parse it 12:24:48 Ralph (Ralph@30-7-118.wireless.csail.mit.edu) has joined #dig 12:25:23 Ralph is now known as RalphS 13:33:54 timbl (~timbl@host109-156-61-106.range109-156.btcentralplus.com) has joined #dig 13:39:46 timbl, presbrey was saying you had written some code for tabulator to go through a proxy 13:39:51 to avoid CORS 13:43:10 I am just starting to need that for https://github.com/bblfish/rdflib.js/commit/2c0ee65e30cca014849a8065d513e3cf8fcaccb6 13:43:13 oops 13:43:22 I meant for http://bblfish.github.com/rdflib.js/example/people/social_book.html 13:46:21 ummm.... yes .. I Was building that and I found the problem was recognizing when in fact he cross-site scripting blaock had happened. 13:46:42 ah yes, I thought that might be difficult to work out 13:47:55 I was thinking of setting up a pure HTTP Proxy service because that should be very efficient to set up 13:48:11 it would just add cors 13:48:12 a 13:48:29 and it would be clear that my site was not making the statements. 13:48:56 (efficient, because there would be no need to parse the rdf) 13:49:35 But I don't understand quite what security CORS brings to the table 13:52:04 The code (untested and buggy) is in rdflib.js/web.js 13:52:12 grep crossSiteProxyTemplate 13:52:53 should be newURI = this.crossSiteProxyTemplate.replace('{uri}', encodeURIComponent(uri)); 13:58:40 ok thanks 13:59:48 timbl, btw we have a new WebID Community Group http://www.w3.org/community/webid/ 14:08:21 Great 14:31:26 mho mind you I suppose that trying to connect through a proxy, might not work if the user is already behind a proxy. 14:31:47 so, the pure proxy idea does not work that well…. 14:53:58 melvster1 (~melvin@p4FF97F1C.dip.t-dialin.net) has joined #dig 14:55:18 melvster has quit (Ping timeout: 272 seconds) 15:11:58 timbl has quit (Read error: Connection reset by peer) 15:12:10 timbl (~timbl@host109-156-61-106.range109-156.btcentralplus.com) has joined #dig 15:42:32 I think it should be possible to find out why it did not work, because you can call xhr.getAllResponseHeaders() 15:47:21 yep, it's working. probably going through the proxy 16:22:07 -- xhr.getAllResponseHeaders() how will that show that the cal was blcoked for CORS? 16:32:59 trying to work out what is going on here. I thought it was working for a while, but ... 16:42:14 I don't think it ever goes into state 0 16:42:21 it always first starts with 1 16:42:31 ie. OPENED 16:43:14 then it goes over to 4 16:43:28 at least you can see that in debug mode with http://bblfish.github.com/rdflib.js/example/people/social_book.html 16:50:44 Pipian_ (~pipian@31-33-50.wireless.csail.mit.edu) has joined #dig 16:52:28 ah found a way to get a message in chrome 16:54:04 it throws an exception in the case 4 handle response 16:54:30 well there it calls the onerror method 17:31:27 oh stack overflow has something http://stackoverflow.com/questions/5018566/catching-xmlhttprequest-cross-domain-errors 17:47:33 I still completely fail to see what the point of CORS is 17:53:15 amy has quit (Ping timeout: 260 seconds) 17:58:32 yes, so the only way to know it failed seems to be to catch an error. (Pretty inefficient really) 18:12:03 presbrey (~presbrey@2001:4830:2446:b5:aede:48ff:fe00:2001) has joined #dig 18:12:36 DIGlogger, pointer 18:12:36 See http://dig.csail.mit.edu/irc/dig/2012-01-20#T18-12-36 18:27:14 bblfish, from http://stackoverflow.com/questions/5018566/catching-xmlhttprequest-cross-domain-errors :- 1) On CORS requests, the browser's console.log will display an error message. However, that error message is not available to your JavaScript code (I think this is done for security reasons, I asked this question once before: Is it possible to trap CORS errors?). 18:27:14 2) The xhr.status and xhr.statusText aren't set in the onError handler, so you don't really have any useful information as to why the CORS request failed. You only know that it failed. 18:27:27 yes 18:27:48 but onError() takes a exception param surely 18:28:22 I have just rewritten the code to move it into onError 18:28:29 in a second or two it will be live 18:28:35 I have alreday: xhr.onerror = function(event) { 18:28:35 sf.failFetch(xhr, "XHR Error: "+event) 18:28:35 } 18:28:57 failFetch will leave a status in the tabulator metadata 18:29:39 I don't remember seeing it 18:31:09 well it takes a bit more than an error 18:31:12 a second 18:33:45 Ahhh .. with safari I see it: [18:32:27.732] XHR Error: [object XMLHttpRequestProgressEvent] 18:34:04 arg 18:34:15 So a XMLHttpRequestProgressEvent does't have a toString 18:34:17 I can't get my caches to update to the latest 18:34:32 version 18:34:45 mhh 18:34:56 and see what it is 18:35:15 silly me 18:36:45 RalphS has quit (Ping timeout: 252 seconds) 18:36:54 ok it's updated 18:44:28 Ralph (Ralph@30-7-118.wireless.csail.mit.edu) has joined #dig 18:45:04 http://opensource.apple.com/source/WebCore/WebCore-737.5/xml/XMLHttpRequestProgressEvent.h 18:57:07 amy_ (~amy@30-6-207.wireless.csail.mit.edu) has joined #dig 19:09:35 well the changes are up there in rdflib.js 19:09:36 view-source:http://bblfish.github.com/rdflib.js/example/people/social_book.html 19:09:41 but it does not quite do it 19:10:29 I moved the code to onerror 19:10:53 http://bblfish.github.com/rdflib.js/example/people/social_book.html 19:12:15 ie here: https://github.com/bblfish/rdflib.js/blob/master/web.js 19:12:28 but I need it to run the next xhr2 19:19:44 ah it does not reach there 19:24:57 I think we shouuld drop the XPConnect exceptions 19:25:20 hardly worth breaking the dataskin on firefox 19:35:27 I am not sure what is meant to happen with this xhr2 https://github.com/bblfish/rdflib.js/blob/master/web.js#L665 19:40:33 mho perhaps it works, but no longer calls my callback 19:42:57 simplest way to check is to use a callback like this function(){ document.body.style.backgroundColor = '#000'; } 19:43:50 mhh yes 19:43:51 thanks 19:44:14 you are welcome, :) 19:44:20 presbrey: http://webcredits.org/ :) 19:45:28 in firebug there is a net panel where you can watch xhr. 19:52:12 well yes. IT does fetch it. It's just I need to have xhr2 have the same handlers as xhr initial 19:52:27 perhaps if I just copy the handlers over? 19:55:47 with initial xhr, open method will reuse it as it is 19:56:39 but results are tricky, if is async you will never know which open respond 19:57:13 if is sync, second will not run untill first is finished, so second is useless 20:00:08 I call it like this 20:00:08 fetch.nowOrWhenFetched(docURI, undefined, function() { 20:00:09 card(person,kb) 20:00:10 friends(person,kb,col+1) 20:00:11 }); 20:03:53 is nothing wrong with it imo 20:04:47 if card, friends do what you expect and if kb is populated i think should work 20:06:16 you are far before me, last thing i tried was to populate kb, but i want to do this in ffox, :) 20:07:30 ™mhh 20:07:31 ok 20:08:08 it's the definition of https://github.com/bblfish/rdflib.js/blob/master/web.js#L545 20:08:12 nowOrWhenFetched 20:08:26 this.addCallback('done', function(uri2) { 20:08:26 if (uri2 == uri) callback(); 20:08:27 return (uri2 != uri); // Call me again? 20:08:28 }); 20:08:46 of course if we use the proxy, then uri2 !- uri 20:09:28 first call will answer with 'unrequested' and will triger the last if 20:10:07 then probably will fire again 20:10:52 sta = this.getState(uri), first line :) 20:11:16 sta will be 'unrequested' 20:11:38 github (~github@sh1-ext.rs.github.com) has joined #dig 20:11:38 [rdflib.js] presbrey pushed 2 new commits to master: http://git.io/pZu97g 20:11:38 [rdflib.js/master] web.js: continue without XPConnect - Joe Presbrey 20:11:38 [rdflib.js/master] jquery.xmlns.js: add upstream fixes - Joe Presbrey 20:11:38 github has left #dig 20:12:01 github (~github@sh1-ext.rs.github.com) has joined #dig 20:12:01 [rdflib.js] presbrey force-pushed gh-pages from 81020e7 to 8b15d85: http://git.io/rfmeFA 20:12:02 [rdflib.js/gh-pages] gh-pages: add dist - Joe Presbrey 20:12:02 github has left #dig 20:12:09 why without XPConnect? 20:12:28 is that not something that works on IE? 20:12:46 no thats a Firefox thing 20:12:52 and CORS can provide access without it 20:13:19 doesn't work in ffox 20:13:25 ah it's XDomainRequest that's IE 20:14:05 rszeno, no, it never calls my "done" handler because of that if statement 20:14:25 perhaps if I remove the if? 20:14:41 I wonder why it is there though 20:14:57 it manage the state 20:15:03 why does the callback check the URIs 20:15:16 one of 'fetched, done or unrequested 20:15:35 in nowOrWhenFetched 20:15:41 https://github.com/bblfish/rdflib.js/blob/master/web.js#L545 20:15:58 yes, lines 545 to 555 20:16:59 yes. How do I overcome that if we change the URIs to be using proxy? 20:17:15 perhaps just do a proxy text too? 20:17:34 (that feels quite hawkish) 20:17:42 hackish 20:18:04 uri2 != uri in proxy case? 20:18:17 yes, currently 20:18:42 see the xhr2 area of code 20:18:53 627-> 20:19:44 oh I know. I'll set the URI back then and then call the done method again? 20:20:07 at least it puts the code together 20:20:40 bblfish: does this help? http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/ 20:20:46 i guess this will run only in case of error 20:20:57 request.withCredentials 20:22:14 mho, I think my problem is just now with the code web.js that I am hacking 20:22:19 but that could be useful 20:22:45 a bit on xhr2 and preflighted requests too 20:23:41 no xhr2 is a variable in the web.js code 20:23:45 it's not a standard 20:26:19 amy_ is now known as amy 20:26:36 look here in latest Firefox 20:26:38 http://data.fm/proxy?uri=http://bblfish.net/people/henry/card 20:26:52 yes? 20:27:00 got it past the XPConnect but now its not seeing content-type or any other headers 20:28:30 crashed my ff :) 20:30:16 arg sorry 20:30:22 lol np 20:30:36 3.6 didn't crash but give an error 20:31:12 "HTTP failed unusually. (no handler set) (cross-site violation?)" 20:31:48 and work in rest, :) 20:57:54 kennyluck_ (~kennyluck@114-43-116-53.dynamic.hinet.net) has joined #dig 21:01:07 kennyluck has quit (Ping timeout: 276 seconds) 21:01:08 kennyluck_ is now known as kennyluck 21:14:38 Pipian__ (~pipian@30-9-3.wireless.csail.mit.edu) has joined #dig 21:16:36 Pipian_ has quit (Ping timeout: 240 seconds) 21:18:43 Pipian__ has quit (Client Quit) 21:19:28 Ralph has quit () 21:28:41 melvster1 has quit (Quit: Leaving.) 21:39:20 ok done http://bblfish.github.com/rdflib.js/example/people/social_book.html 21:39:39 it now uses presbrey's proxy 21:39:58 not sure the code is the best 21:40:10 well very likely it is not 21:40:45 ran into lots of bugs because of there being no typing in javascript 21:42:15 mho let me check the code in 21:47:42 mho, well now it really does not work in Firefox 21:47:53 but Chrome and Safari do work 21:48:50 opera neither 21:52:37 I have a feeling that one should not really be using CORS at all 21:52:42 just slows things down 21:52:50 proxies should work well enough 21:55:40 1. use core, and fall back on proxy 21:55:52 2. transform all urls trhough proxy directly 22:05:10 good night folks 22:18:27 melvster (~melvin@p4FF97F1C.dip.t-dialin.net) has joined #dig 22:41:41 bblfish, " please check that this.proxyUsed is the right " ? 22:45:48 why did you move from state=0 to onerror? 22:50:51 github (~github@sh1-ext.rs.github.com) has joined #dig 22:50:51 [rdflib.js] presbrey pushed 5 new commits to master: http://git.io/6HbTBA 22:50:51 [rdflib.js/master] getting the template to work - Henry Story 22:50:51 [rdflib.js/master] was missing full path for $rdf.Fetcher.crossSiteProxy - Henry Story 22:50:51 [rdflib.js/master] was not using the right uri. xhr.uri is the one. - Henry Story 22:50:51 github has left #dig 22:51:00 github (~github@sh1-ext.rs.github.com) has joined #dig 22:51:00 [rdflib.js] presbrey force-pushed gh-pages from 8b15d85 to a753c20: http://git.io/rfmeFA 22:51:00 [rdflib.js/gh-pages] gh-pages: add dist - Joe Presbrey 22:51:00 github has left #dig 23:04:50 github (~github@sh1-ext.rs.github.com) has joined #dig 23:04:50 [tabulator] presbrey pushed 2 new commits to master: http://git.io/zBdZ0A 23:04:50 [tabulator/master] mashlib: testing proxy support - Joe Presbrey 23:04:50 [tabulator/master] Makefile: add PHONY targets - Joe Presbrey 23:04:50 github has left #dig 23:24:05 PHONY ? 23:28:06 tells make not to look for a real file called 'update' or 'all' 23:28:14 designates them as phony/fake targets 23:46:19 hi 23:47:43 presbrey: state 0 was never called 23:47:53 in Safari and chrome at least 23:49:23 state 4 is the only one you can reply on 23:49:53 the other states get called 1 after open, 2 ehen headers, 3 as reading data, etc but not reliably especially if thise things don't happen 23:52:01 please review my code in detail if you can. I am new so there must be improvements to be made 23:52:13 I am just trying to get things working