Re: RFE: don't create directory if host doesn't exist
amb-Uxr6IM1mbv2TY6FTCsQk+9Bc4/[email protected] (Andrew M. Bishop) 12 Apr 2006 19:22:11 +0100
| Newsgroups | gmane.network.wwwoffle.user |
|---|---|
| Message-ID | <[email protected]> |
Matus UHLAR - fantomas <[email protected]> writes: > > > > Matus UHLAR - fantomas <[email protected]> writes: > > > > > I often paste string from clipboard to a mozilla browser, which > > > > > results into tryting to open URL pointed at (it's very good feature > > > > > of mozilla). > > > > > > > > > > When this happens, wwwoffle creates directory for the "host", even > > > > > if it does not exist. It means that I get many useless directories > > > > > (with error messages) created in spool directory. > > When DNS fails there can be lots of reasons: > [...] > > * The user typed in a wrong name (the host never has and never will exist). > [...] > > They will want to see the error message because it is important to > > them to know that the host is not accessible today. The problem is > > that there is no way to know that the host does not exist, only that > > it is not known by DNS today. > > I think it could. Afaik, DNS returns different result if it received > authoritative answer "host does not exist", than if it is not able to > resolve hostname in the given time. In this case, (and probably in the > others) I don't see any reason in creating the directory for the host. > > and I think it's not very easy to code... I agree. There are two cases even in this one example. 1) The DNS server for the domain could not be contacted 2) The DNS server could be contacted but has no record of the hostname. In the first case the hostname does exist, the DNS is the one in error, you would want the error message written (?). In the second case the host does not exist (today anyway) and you would not want the error message written. > > What you are asking for is for WWWOFFLE to behave differently for one > > special case (online, no parent proxy) than all other cases. > > I would say it different: Don't create directory if you have no data to > fetch. We do have data, the data says that the host could not be contacted. > If we have parent proxy which returns the data, OK, I can't do > anything with this. So as a special case we keep the data if somebody else provided it. But we don't create our own error messages with the same data. > If we are offline, request will only be recorded in > outgoing, no directory is created (right?). This is correct. > But if we are trying to fetch data and we find out that there's nowhere to > fetch them from, let's just skip it and return an error message. If the user requested the page offline then we do need to keep it. > > This will add confusion because error messages will be cached for some > > hosts but not other depending exactly when they were requested and the > > state of the configuration file. > > I don't see much possible confusion here - just different kinds of error > messages, which are still different when user does or does not use a proxy You are creating special cases when errors will be kept only if certain conditions are met and in other cases there will be no error kept. -- Andrew. ---------------------------------------------------------------------- Andrew M. Bishop amb-Uxr6IM1mbv2TY6FTCsQk+9Bc4/[email protected] http://www.gedanken.demon.co.uk/ WWWOFFLE users page: http://www.gedanken.demon.co.uk/wwwoffle/version-2.8/user.html