Boris Zbarsky wrote:
Aaron Reed wrote:
Currently I build a channel and if it is just a http channel I request the head otherwise I'll request the whole thing.

If that level of pinging is ok for you, see nsIURIChecker.idl.

Note, however, that HEAD requests are broken on a lot of servers. If you seriously rely on this to be correct out on the interweb, then you're kinda screwed if you want to use HEAD requests.

-Boris

Thanks for the quick response! Ok, if I want to be conscientious and not just do a simple ping (due to the HEAD issues you brought up), I'll run into the problem that I mentioned earlier where my OnStopRequest is getting a status code back with NS_ERROR_UNEXPECTED (due to the fact that we don't read anything during OnDataAvailable). Do you know any efficient way around this since we aren't really concerned with what comes back, just whether we got an error or not? Having to read in the data just to forget it seems like a waste. But we don't want to remember the data since we could have a lot of these on our page and they don't get triggered all that often (just when the user asks for help, for example). We tried seeking to the end using the nsISeekableStream interface, but that didn't work.

Any ideas welcome,
--Aaron
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to