Article View: borland.public.cppbuilder.nativeapi
Article #9084Re: URL Offsets Prevent URLs from being passed to a browser
From: Chris Croughton
Date: Fri, 30 Jul 2004 13:45
Date: Fri, 30 Jul 2004 13:45
42 lines
3028 bytes
3028 bytes
On Thu, 29 Jul 2004 10:16:17 -0700, Bob Gonder
<notbg@notmindspring.invalid> wrote:
> Hans Galema wrote:
>
>>That would have made things inconsequent. http:// invokes communication
>>with a webserver. Where a -local-file:// has to be grabbed by the browser
>>itself. Quite different.
>
> If you fire up I.E. and enter a URL from the address bar, you don't
> type in the http: or file:, just the URL, and it decides where that
> resides. Why should starting it with a commandline be any different?
Because the application is already running, and can interpret its
user input however it wants. For instance I have one browser which
systematically tries adding www. to the front, .com, .org etc. to the
end, until it finds something which works. That sort of thing is up to
a program to do (some may want to try opening as a file first, others as
a web page first, or whatever).
Programming interfaces are dumb. If I say fopen("fred", "r"), it won't
look for fred.html, fred.htm, fred/index.html, http:/www.fred.com/ or
anything else, it will look for a file called fred in its current
directory. If the programmer wants anything else, they can write it.
> Why should the programmer interface be dumber than the user interface?
Because the programming interface needs to do what the programmer wants,
and nothing more. If I tell it to run "fred.com", it will assume that I
mean the file of that name. If the file doesn't exist (or isn't
executable) then it will return an error, and the program can then
decide what to do (it probably wants to give the user an indication of
error, for most purposes; only a browser would assume that it meant an
internet address, and that would probably assume web access as the first
option).
If I type "fred.com" into IE, it will look for a web site with that
name. If I mean that it should open a file of that name, I have to tell
it explicitly (or use an editor or some other program). It's a program
(and programmer) decision.
Chris C
Technical Details
Message-ID:
<slrncgkk85.9lp.chris@ccserver.keris.net>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mailReferences:
<41048d77$1@newsgroups.borland.com> <2mtag0ha1q4e2uj39svnoruuib3k80s5cu@4ax.com> <4106cdf8$1@newsgroups.borland.com> <j4mfg0hmlt7jsua93d5adv6u76e15j6286@4ax.com> <4107fd2a$1@newsgroups.borland.com> <e14gg09bqv9mqdl6khkm5bhettvbqa7nil@4ax.com> <4108a62c$1@newsgroups.borland.com> <b0big01utsdacc51bb8n9foodnlkfco9a3@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,80cfdee9a8d50af3 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Croughton <chris@keristor.net> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: URL Offsets Prevent URLs from being passed to a browser Date: Fri, 30 Jul 2004 14:45:41 +0100 Lines: 42 Message-ID: <slrncgkk85.9lp.chris@ccserver.keris.net> References: <41048d77$1@newsgroups.borland.com> <2mtag0ha1q4e2uj39svnoruuib3k80s5cu@4ax.com> <4106cdf8$1@newsgroups.borland.com> <j4mfg0hmlt7jsua93d5adv6u76e15j6286@4ax.com> <4107fd2a$1@newsgroups.borland.com> <e14gg09bqv9mqdl6khkm5bhettvbqa7nil@4ax.com> <4108a62c$1@newsgroups.borland.com> <b0big01utsdacc51bb8n9foodnlkfco9a3@4ax.com> Reply-To: chris@keristor.net X-Trace: news.uni-berlin.de +KdWLixgFk725zLwLS9tcAt5wTrMb9/mOKURnII4FziLv95j0= X-Orig-Path: ccserver.keris.net!news User-Agent: slrn/0.9.7.4 (Linux)