Re: Accessing web with a C program



richard@xxxxxxxxxxxxxxx (Richard Tobin) writes:
In article <45d46812.180010404@xxxxxxxxxxxxxx>,
Richard Bos <rlb@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Again: it is not fopen() which supports this in the first place. fopen()
gives you what it gets from the OS. To suggest that the C library
_should_ bypass the OS and support HTTP (how!?) when the OS only gives
you NFS as normal files is, IMO, rather weird.

It would be bizarre for the OS (in the sense of the unix kernel) to
provide support for arbitrary protocols such as HTTP, since there's no
need for them to be implemented at that level. It would not make much
sense for it to be part of C either. But it would be perfectly
reasonable for a library to provide it, and for it to use the fopen()
function to do it. Obviously it would need various support functions,
because these protocols have many options that can't reasonably be
accessed through standard C functions, but it would be very useful if
existing programs that fopen() a file for reading were to suddenly
start working with, say, HTTP URIs.

Probably the most reasonable way to do this, on most systems, is to
provide a filesystem that's actually implemented on top of an http
interface, mapping URLs to file names somehow (the mapping could be
trivial or not). Some systems already provide hooks to support this
kind of thing. The details of implementing this kind of thing are, of
course, off-topic, but no more so than implementing a filesystem that
provides access to a local hard drive. Once it's done, fopen() and
friends will Just Work.

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.



Relevant Pages

  • Re: Accessing web with a C program
    ... Richard Tobin wrote: ... _should_ bypass the OS and support HTTP when the OS only gives ... If you think about it - and we were all using URIs diligently, ...
    (comp.lang.c)
  • RE: Writing A Web Browser.... Sort of...
    ... in ASP.NET which is still able to used in SPS server: ... Introduction to HTTP Modules ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Generated javascript from .pl files
    ... Because web servers might use a different HTTP specification than ... the visiting browser, so possible HTTP version conflicts arise. ... I'd like to see an otherwise usable Web client that does not support ... one that is used here does not rely on the (Content-* request) HTTP headers. ...
    (comp.lang.javascript)
  • Re: Hardware to web service
    ... As for webservice itself, it is rely on XML SOAP message transfering over ... http protocol, and since http is simply over Tcp, you can ... surely send webservice request via raw TCP socket programming. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: rpc over http woes.. single exchange server 2 DC controllers 1 of which is a GC
    ... you can enable RPC over HTTP connection on your ... > Exchange server, which is neither a DC nor a front-end server. ... > Microsoft Online Partner Support ...
    (microsoft.public.exchange.admin)