]> git.ipfire.org Git - thirdparty/opentracker.git/commitdiff
Made answer http/1.1
authorerdgeist <>
Sat, 16 Dec 2006 01:22:48 +0000 (01:22 +0000)
committererdgeist <>
Sat, 16 Dec 2006 01:22:48 +0000 (01:22 +0000)
opentracker.c

index 53a2517093f0445074f0d946963b664d7359356e..57d505a937c644154ee28c660f46760910162175 100644 (file)
@@ -301,13 +301,10 @@ e404:
       goto bailout;
     }
 
-    c=h->hdrbuf=(char*)malloc(500);
-    c+=fmt_str(c,"HTTP/1.1 200 OK\r\nContent-Type: text/plain");
-    c+=fmt_str(c,"\r\nContent-Length: ");
+    c=h->hdrbuf=(char*)malloc(80);
+    c+=fmt_str(c,"HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\nContent-Length: ");
     c+=fmt_ulonglong(c, reply_size );
-    c+=fmt_str(c,"\r\nLast-Modified: ");
-    c+=fmt_httpdate(c,time(0));
-    c+=fmt_str(c,"\r\nConnection: close\r\n\r\n");
+    c+=fmt_str(c,"\r\n\r\n");
     iob_addbuf(&h->iob,h->hdrbuf,c - h->hdrbuf);
     if( reply && reply_size ) iob_addbuf_free(&h->iob,reply, reply_size );
 
@@ -331,7 +328,7 @@ int main()
     uint16 port;
 
     ot_start_time = time( NULL );
-    if (socket_bind4_reuse(s,NULL,9090)==-1)
+    if (socket_bind4_reuse(s,NULL,6969)==-1)
         panic("socket_bind4_reuse");
 
     if (socket_listen(s,16)==-1)