httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Héctor Garcia Peris <hector.gar...@ivie.es>
Subject Problem with x-mixed-replace mime type
Date Wed, 13 Mar 2002 08:56:46 GMT
Hello all,

I'm new in this list and I take this opportunity to send my greetings to 
all. I don't know if this is the correct list to ask my question, but here 
is it.

I'm writing a program in C that reads from a web camera an image with 
intervals of 10 seconds. This is the code of the program:

#include <stdio.h>
#include <stdlib.h>

int  main (argc, argv)
int argc;
char *argv[];
{
         printf("Content-Type: multipart/x-mixed-replace;boundary=cadena\n\n");
         printf("--cadena\n");
         while (1)
         {
                 printf("Content-Type: image/jpeg\n\n");
                 fflush(stdout);
                 system("wget -O - http://@camara/cgi-bin/jpg/image.cgi 
2>/dev/null");
                 printf("\n--cadena\n");
                 fflush(stdout);
                 sleep(10);
         }
         exit(0);
}

I put this program under the cgi-bin directory and I hope that each 10 
seconds the cgi sends me an image from the camera. But the program doesn't 
makes this. It only sends one image and finishes the connection. I get the 
headers sent by my cgi with the lynx navigator and I get this:

HTTP/1.1 200 OK
Date: Wed, 13 Mar 2002 08:45:15 GMT
Server: Apache/1.3.14 (Unix) Debian/GNU PHP/4.0.4pl1
Connection: close
Content-Type: multipart/x-mixed-replace;boundary=cadena

What am I making wrong?

Thanks.



---------------------------------------------------------------------
Héctor Garcia Peris
Dpto. Informática
Instituto Valenciano de Investigaciones Económicas S.A. (Ivie)
C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain)
Tfno.: +34 - 963190050 / +34 - 963930816
Fax.: +34 - 963190055 / +34 - 963930856
e-mail: hector.garcia@ivie.es
----------------------------------------------------------------------



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message