Web Server Demo Program

Thomas Doerfler Thomas.Doerfler at imd-systems.de
Wed Feb 26 19:56:13 UTC 2003


Hi,

we set up the web server based on rtems-ss-
20021111, and were a bit confused, because the 
web server did not automatically assume 
"index.html" in the root directory as default web 
page. We got the Browser/server working properly, 
when we explicitly specified an URL like:  

"http://123.234.45.56/index.html"

but it did not work with 

"http://123.234.45.56/"

We did not investigate further up to now. Does 
this help?

wkr,
	Thomas.

> 
> 
> Mike Siers wrote:
> > 
> > Hi,
> > I hacked the c/src/libmisc/untar/untar.c file to remove
> > the blank characters from the string compare.  Now when
> > I step through the untar function it seems like everything
> > works.
> 
> I think this qualifies as a bug unfortunately.  It would
> be nice to get a 2nd check on another host system.  <HINT
> TO ANYONE>
> 
> > The web server comes up now since it reads the /etc/hosts
> > file but I can not see the web page from my browser.  The
> > RTEMS box accepts the HTTP request but my browser is getting
> > back a 400 page not found error.
> > 
> > Any more hints?
> 
> I can't see in the code where it says what root directory to use
> but you have to have an index.html on the rootfs.  It may be in /
> or have to be in a subdirectory.  But I can't see it.  Does
> anyone know where it has to be?
> 
> > Mike Siers
> > 
> > -----Original Message-----
> > From: Joel Sherrill [mailto:joel.sherrill at OARcorp.com]
> > Sent: Wednesday, February 26, 2003 11:46 AM
> > To: Mike Siers
> > Cc: RTEMS Users
> > Subject: Re: Web Server Demo Program
> > 
> > Mike Siers wrote:
> > >
> > > Hi,
> > > I think my real problem is in the untarring of the IMFS image.
> > > I stepped through the function Untar_FromMemory().  This function
> > > takes an unsigned char pointer and a size value.  It does an offset
> > > into the buffer and a string length compare with the string "ustar  "
> > > and a length of 7.  This string compare is failing.  The string that
> > > I have in my buffer is just "ustar" instead of "ustar  ".
> > >
> > > I am building using an OpenBSD system instead of the traditional
> > > Linux system.  Could this be my problem?  Or is this a bug in
> > > the untar function?  I will try hacking the function to see if it
> > > fixes my problem.
> > 
> > According to the OpenGroup tar.h specification, TMAGIC is "ustar"
> > which is "ustar plus null byte".  So I think it is incorrect to
> > assume that the space is there.  TMAGLEN is 6 as the length of
> > TMAGIC.    The standard is online so you can read it yourself.
> > 
> > 
> > > Also, when I build the application, the call to i386-rtems-objcopy
> > > to create the tarfile.o object file gives a warning that the output
> > > file cannot represent architecture UNKNOWN.  Is this warning normal?
> > 
> > This is normal from my experience.
> > 
> > > Thanks
> > > Mike Siers
> > >
> > > -----Original Message-----
> > > From: Mike Siers [mailto:mikes at poliac.com]
> > > Sent: Wednesday, February 26, 2003 9:52 AM
> > > To: RTEMS Users
> > > Subject: Web Server Demo Program
> > >
> > > Hi,
> > > I am trying to get the http demo up and running.  I am
> > > using RTEMS snapshot 20021118 and network demos 20021018.
> > >
> > > The http task (rtems_httpd_daemon) first calls to get the
> > > host name (gethostname) and then calls to get the host
> > > address (gethostbyname).  The gethostbyname() function
> > > is failing.  I have added an entry into the rootfs/etc/hosts
> > > file for my host name but when gethostbyname() does an
> > > fopen() on the host file, the fopen call fails.  I have my
> > > CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS set to 20.
> > >
> > > Any thoughts or hints on how I can get the http demo to
> > > work would be greatly appreciated.
> > >
> > > Thanks
> > > Mike Siers

--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler           Herbststrasse 8
D-82178 Puchheim          Germany
email:    Thomas.Doerfler at imd-systems.de
PGP public key available at: http://www.imd-
systems.de/pgp_keys.htm




More information about the users mailing list