The error is reproducable on the shttpd stand alone server available from the shttpd.sf.net downloads page. Actually the attached image is from the unmodified shttpd web server 1.38 for windows serving the test page from the mail below.
I get directly the binaries from the sf site, no compilation/modifications from me so far. And obviously there are no HTML/CSS/JS errors as the test page is fairly simple(just few img tags). The problem usually appears after hitting refresh several times, it happens frequently on IE(6.0 and 7.0) but I saw it few times on Firefox too. Kroum ----- Original Message ----- From: "David Lethe" <[EMAIL PROTECTED]> To: "Kroum Grigorov" <[EMAIL PROTECTED]>; <[email protected]> Sent: Wednesday, October 24, 2007 1:17 PM Subject: RE: [shttpd-general] shttpd problem serving multiple images on a page > I have seen this problem before, but it was programmer error (with me as the programmer ;) > There are numerous things you need to look at, perhaps if you posted more information about your program. > > A few things I suggest > - Compile with full warnings on, and make sure you are using 32-bit compiler/linker. This source code is not 64-bit compatible. There are numerous problems where int is improperly used instead of size_t. 64-bit pointers will get truncated to 32 bits on 64-bit operating systems. > - Use Mozilla & firebug to look for errors on your HTML/CSS/JS, whatever ... > - if you are able and willing to publish some source code that reproduces problem, perhaps something will stick out > - Check values in defs.h, such as below: > #define URI_MAX 200000 /* Bumped up OCT-2007 DAL */ > > - Use no-cache pragmas and headers where appropriate for dynamically generated content if necessary. > > Modify shttpd_printf in io_emb.c to add debug .. > > size_t shttpd_printf(struct shttpd_arg *arg, const char *fmt, ...) > { > struct conn *c = arg->priv; > struct io *io = &c->loc.io; > char *buf = arg->out.buf + arg->out.num_bytes; > int buflen = arg->out.len - arg->out.num_bytes, len = 0; > va_list ap; > > assert(buf <= io->buf + io->size); > > if (buflen > 0) { > va_start(ap, fmt); > len = vsnprintf(buf, buflen, fmt, ap); > va_end(ap); > if (DebugLevel(ANAL)) // Lethe > printf("nSize: %d, buff: %s\n", len, buf); // Lethe > if (len < 0 || len > buflen) > len = buflen; > arg->out.num_bytes += len; > } > > return (len); > } > > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kroum Grigorov > Sent: Thursday, October 25, 2007 12:35 AM > To: [email protected] > Subject: [shttpd-general] shttpd problem serving multiple images on a page > > Hi, > > I'm playing with shttpd(embeded) on windows and I'm pretty happy with it, > but I have one annoying problem. > When the served page has multiple images, most of the time, some of the > images are not served correctly. > For example accessing this page through shttpd usually results in one of the > images not shown in the browser.(see the image attached) > <img src="1.gif"><br> > <img src="2.gif"><br> > <img src="3.gif"><br> > <img src="4.gif"><br> > <img src="5.gif"><br> > <img src="6.gif"><br> > <img src="7.gif"><br> > <img src="8.gif"><br> > <img src="9.gif"><br> > <img src="10.gif"> > > Any help would be great. > > Thanks, > Kroum > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ shttpd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shttpd-general
