From 6286c1cea533604c5c91cd245cf3cffb6e00943e Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sat, 16 Dec 2006 01:22:48 +0000 Subject: Made answer http/1.1 --- opentracker.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index 53a2517..57d505a 100644 --- a/opentracker.c +++ b/opentracker.c @@ -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) -- cgit v1.2.3