184,193c184,193 < fprintf(new->fwrite, "HTTP/1.1 200 OK\n"); < fprintf(new->fwrite, "Server: Motion/"VERSION"\n"); < fprintf(new->fwrite, "Connection: close\n"); < fprintf(new->fwrite, "Max-Age: 0\n"); < fprintf(new->fwrite, "Expires: 0\n"); < fprintf(new->fwrite, "Cache-Control: no-cache\n"); < fprintf(new->fwrite, "Cache-Control: private\n"); < fprintf(new->fwrite, "Pragma: no-cache\n"); < fprintf(new->fwrite, "Content-type: multipart/x-mixed-replace;boundary=BoundaryString\n"); < fflush(0); --- > > fprintf(new->fwrite, "HTTP/1.1 200 OK\r\n"); > fprintf(new->fwrite, "Server: Motion/"VERSION"\r\n"); > fprintf(new->fwrite, "Connection: close\r\n"); > fprintf(new->fwrite, "Max-Age: 0\r\n"); > fprintf(new->fwrite, "Expires: 0\r\n"); > fprintf(new->fwrite, "Cache-Control: no-cache, private\r\n"); > fprintf(new->fwrite, "Pragma: no-cache\r\n"); > fprintf(new->fwrite, "Content-type: multipart/x-mixed-replace; boundary=BoundaryString\r\n"); > fflush(new->fwrite); 210,212c210,214 < fprintf(list->fwrite, "\n--BoundaryString\n"); < fprintf(list->fwrite, "Content-type: image/jpeg\n"); < fprintf(list->fwrite, "Content-Length: %ld\n\n", list->tmpfile->size-1); --- > fflush(list->fwrite); > fprintf(list->fwrite, "\r\n--BoundaryString\r\n"); > fprintf(list->fwrite, "Content-type: image/jpeg\r\n"); > fprintf(list->fwrite, "Content-Length: %ld", list->tmpfile->size); > fprintf(list->fwrite, "\r\n\r\n"); 279d280 < fwrite("\n", 1, 1, tmpfile->fd);