X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fdebugsink.c;h=dee8c98526d2d7cc72a38e2855412b36eec22272;hb=2a516eedef5051e08ecaf7ddaa3adebe6cf239de;hp=eb389f3bee8fcd01ac1ab88248c16dde3d049501;hpb=3c296bd47d6b2980206c3c87cfa949583f2a09d6;p=ashd.git diff --git a/src/debugsink.c b/src/debugsink.c index eb389f3..dee8c98 100644 --- a/src/debugsink.c +++ b/src/debugsink.c @@ -47,9 +47,9 @@ int main(int argc, char **argv) printf("%s %s %s %s %s\n", req->method, req->url, req->ver, req->rest, getheader(req, "x-ash-address")); out = fdopen(fd, "w"); if(!strcmp(req->rest, "")) { - fprintf(out, "HTTP/1.1 200 OK\r\n"); - fprintf(out, "Content-Type: text/html; charset=utf8\r\n"); - fprintf(out, "\r\n"); + fprintf(out, "HTTP/1.1 200 OK\n"); + fprintf(out, "Content-Type: text/html; charset=utf8\n"); + fprintf(out, "\n"); fprintf(out, "\n\n
\n\n
\n\n\n"); } else if(!strcmp(req->rest, "post")) { nb = 0; @@ -61,19 +61,19 @@ int main(int argc, char **argv) break; nb += ret; } - fprintf(out, "HTTP/1.1 200 OK\r\n"); - fprintf(out, "Content-Type: text/plain; charset=utf8\r\n"); - fprintf(out, "\r\n"); + fprintf(out, "HTTP/1.1 200 OK\n"); + fprintf(out, "Content-Type: text/plain; charset=utf8\n"); + fprintf(out, "\n"); fprintf(out, "%i\n", (int)nb); } else if(!strcmp(req->rest, "inf")) { - fprintf(out, "HTTP/1.1 200 OK\r\n"); - fprintf(out, "Content-Type: text/plain\r\n"); - fprintf(out, "\r\n"); + fprintf(out, "HTTP/1.1 200 OK\n"); + fprintf(out, "Content-Type: text/plain\n"); + fprintf(out, "\n"); while(1) fprintf(out, "0123456789012345678901234567890123456789012345678901234567890123456789\n"); } else { - fprintf(out, "HTTP/1.1 404 Not Found\r\n"); - fprintf(out, "\r\n"); + fprintf(out, "HTTP/1.1 404 Not Found\n"); + fprintf(out, "\n"); } fclose(out); }