-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 30 Aug 2007 13:18:28 -0400
Thomas Hruska <[EMAIL PROTECTED]> wrote:

> TheOldWiseKing wrote:
> > Hi all,...
> > 
> > I'm working on creating a web server using C. After running the
> > server, and requesting a page from it, the picture inside the page
> > has not been sent. the browser didn't display the picture.
> > 
> > I checked the received HTTP request, and I found the link of the
> > image sent in the referer field. but I don't know how to send it
> > from the server to the browser.
> > 
> > can u advice me plz???
> > 
> > Thank,...
> > 
> > TheOldWiseKing  
> 
> Why are you making a web server?  Apache and IIS are the two dominant 
> market players and is pretty much a closed market (i.e. the web
> server wars are basically over and there are two winners - there is
> still a battle between the two but no room for anything else).
> 
> To answer your question, images are sent in response to a separate
> HTTP request.  You have to include the proper MimeType (e.g.
> image/gif) in your response.
> 
> I highly recommend getting ieHTTPHeaders for IE and whatever the 
> extension name is for Firefox these days that handles HTTP requests 
> (used to be called Live HTTP Headers).  That way you can watch how
> each browser handles sending/receiving each request to/from the
> server.  See what Apache/IIS does and replicate the behavior with
> your server.

Further to this, if the OP wishes to do something specific with the
request or response, which might have led him to require his own web
server then I advise that he looks into Apache modules or read the
documentation as there's a lot there which can be specified in the
config, or looks into ISAPI for IIS.

There is a very good section in Advanced UNIX programming
(http://basepath.com/aup/) which actually goes through making a
web server in some basic terms (setting up the listening socket), but
this is not the highlight of the book. The more important things like
AIO/pipes are discussed earlier in the book, which is the guts that I
bought it for.

- -- 
The 14.4 dialup to the Rebel Base is making a weird noise  because of a
translator who speaks Bocce. Tech Support is blasting through 30
million dollars. :: http://www.s5h.net/ :: http://www.s5h.net/gpg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG1ywq4dyr7s6PRYgRAl1BAJ9wwwLMWNbNIa25l4L5xbTu4V0XSACfYTI2
Z34Z5DB4QIQ0o6kLdNefvVU=
=t4kA
-----END PGP SIGNATURE-----

Reply via email to