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