[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Web Server Demo Program




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