summaryrefslogtreecommitdiff
path: root/apps/JAWS/clients/WebSTONE/src/cgi-send.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/JAWS/clients/WebSTONE/src/cgi-send.c')
-rw-r--r--apps/JAWS/clients/WebSTONE/src/cgi-send.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/apps/JAWS/clients/WebSTONE/src/cgi-send.c b/apps/JAWS/clients/WebSTONE/src/cgi-send.c
deleted file mode 100644
index 0a63070b7b7..00000000000
--- a/apps/JAWS/clients/WebSTONE/src/cgi-send.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* $Id$ */
-/*
- * Send 10K file; send random bits.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define FILE_SIZE 10240
-#define MALLOC_FAILURE "Out of memory"
-
-int
-main()
-{
- int filesize;
- char *str_filesize;
- char *buffer;
- int index;
-
- printf("Content-type: text/plain\r\n\r\n");
-
- if ( !(str_filesize = getenv("QUERY_STRING")) )
- filesize = FILE_SIZE;
- else {
- if ( !strncmp(str_filesize, "size=", 5) )
- filesize = atoi(&(str_filesize[5]));
- else
- filesize = FILE_SIZE;
- }
-
- if ( !(buffer = (char *)malloc(filesize)) ) {
- fwrite(MALLOC_FAILURE, strlen(MALLOC_FAILURE), 1, stdout);
- return -1;
- }
-
- for (index=0; index< filesize; index++)
- /* generate random characters from A-Z */
- buffer[index] = rand() %26 + 63;
-
- fwrite(buffer, filesize, 1, stdout);
-
- free(buffer);
-
- return 0;
-}