GET http://10.211.55.3:8080/<proxy path>/<full file path> | 404 Not Found | 611ms | dojo.js (line 16) |
IBM External Blog: http://www.ibm.com/developerworks/blogs/page/etech_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-i...@mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
From: | Nathan Toone <toon...@dojotoolkit.org> |
To: | dojo-i...@mail.dojotoolkit.org |
Date: | 10/16/2009 08:09 AM |
Subject: | Re: [Dojo-interest] Best way in dojo to test whether a file exists via a url |
I think you are doing it correctly other than you shouldn't have the
try/catch around the xhrGet. The Deferred object that returns handles
trapping errors that occur within. The issue here I don't believe is
your code, but rather FF/Firebug. Tom Trenka recently asked me a
similar question to see if I was getting the same behavior, and we
found that FB displays the 401 errors on xhr requests regardless of
whether the error was trapped or not. I believe, at least at the
time, we were unable to turn that error message off without turning
off Firebug. They (firebug devs) may have changed this now so that
you can toggle the display of those errors.
Thanks,
Dustin
On Oct 16, 2009, at 8:41 AM, John Gerken wrote:
> Hi Nathan,
>
> Totally agree and understand. That's why we've got the proxy in
> place, so it can handle the XD stuff for us. That's also why I'm
> curious if there might be another alternative method to test the
> existance of a file accessable only via URL in a remote domain. Any
> other way to do that that you can think of?
>
> Thanks for taking the time to answer.
> John Gerken
> Senior Architect, Emerging Internet Technologies
> IBM Emerging Technologies Software Group
> John_...@us.ibm.com
> IBM Internal Blog: http://blogs.tap.ibm.com/weblogs/john_...@us.ibm.com/
> IBM External Blog: http://www.ibm.com/developerworks/blogs/page/etech
>
>
> From:
> Nathan Toone <toon...@dojotoolkit.org>
> To:
> dojo-i...@mail.dojotoolkit.org
> Date:
> 10/16/2009 08:09 AM
> Subject:
> Re: [Dojo-interest] Best way in dojo to test whether a file
> exists via a url
>
>
>
>
> <smime.p7s>_______________________________________________
From: | Dustin Machi <dma...@dojotoolkit.org> |
To: | dojo-i...@mail.dojotoolkit.org |
Date: | 10/16/2009 09:00 AM |
Subject: | Re: [Dojo-interest] Best way in dojo to test whether a file exists via a url |
> Yea, suppressing the error message is the primary issue, but
> unfortunately I can't move to 1.4 either. You're right about the
> severity issue. I need to take that up with the architect in
> charge. But beyond that, after reading a bit, you may still have a
> good potential alternative with dojo.io.iframe. If the proxy I'm
> using is the problem (and not as Dustin suggets, just FB) then
> io.iframe may get me around the proxy. So I'm going to give that a
> shot and see what I come up with.
The script io will get you around the proxy fairly easily, though it
won't solve the actual issue at hand regarding the logging. There are
a couple other xd techniques as well. Kris Zyp had a few good
articles on the sitepen blog regarding some of these techniques as
well as the xhrPluginRegistry.
> One thing I've not been able to figure out yet that you might have
> an idea on: The deferred object has a silentlyCancel attribute and
> also has a state indicator of some type. But it's unclear to me how
> I'd manipulate those early enough in the code to prevent the error
> display on the console. The first two errors are displayed before
> my FileDoesNotExistCallback function is called, so I can't do it
> there. Is it possible to manipulate that deferred object in some
> way earlier in the process? What about doing something hackish like
> subclassing deferred or something totally obnoxious like that? ;-)
>
silentlyCancel is a different attribute that controls whether or not
the error handler will be triggered if you cancel a deferred, I don't
think it is going to help you much here. Note that the order of
attaching deferreds has an impact on how/when they get called. This
post, http://www.sitepen.com/blog/2009/03/31/queued-demystifying-deferreds/
, demonstrates how the order of attaching affects the behavior.
Thanks,
Dustin
> Thanks,
> John Gerken
> Senior Architect, Emerging Internet Technologies
> IBM Emerging Technologies Software Group
> John_...@us.ibm.com
> IBM Internal Blog: http://blogs.tap.ibm.com/weblogs/john_...@us.ibm.com/
> IBM External Blog: http://www.ibm.com/developerworks/blogs/page/etech
>
>
> From:
> Nathan Toone <toon...@dojotoolkit.org>
> To:
> dojo-i...@mail.dojotoolkit.org
> Date:
> 10/16/2009 08:59 AM
> Subject:
> Re: [Dojo-interest] Best way in dojo to test whether a file
> exists via a url
>
>
>
>