From 0d9347eb21da122b4073f9dd8c752b187a7148d3 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 27 Jul 2020 10:30:16 +0000 Subject: [PATCH] fixed a simple error handling issue in mio_svc_htts_dothr() --- mio/bin/t01.c | 2 +- mio/lib/http-thr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mio/bin/t01.c b/mio/bin/t01.c index 8b8c4d4..23fc60a 100644 --- a/mio/bin/t01.c +++ b/mio/bin/t01.c @@ -859,7 +859,7 @@ static void on_htts_thr_request (mio_t* mio, mio_dev_thr_iopair_t* iop, mio_svc_ return; } - fprintf (fp, "Status: 201\r\n"); + fprintf (fp, "Status: 200\r\n"); fprintf (fp, "Content-Type: text/html\r\n\r\n"); fprintf (fp, "request path = %s\n", tfi->req_path); diff --git a/mio/lib/http-thr.c b/mio/lib/http-thr.c index 9d41cb7..4a507bc 100644 --- a/mio/lib/http-thr.c +++ b/mio/lib/http-thr.c @@ -847,7 +847,7 @@ int mio_svc_htts_dothr (mio_svc_htts_t* htts, mio_dev_sck_t* csck, mio_htre_t* r } tfs->tfi.req_x_http_method_override = -1; - if (mio_htre_walkheaders(req, thr_capture_request_header, tfs) <= -1) return -1; + if (mio_htre_walkheaders(req, thr_capture_request_header, tfs) <= -1) goto oops; tfs->tfi.server_addr = cli->sck->localaddr; tfs->tfi.client_addr = cli->sck->remoteaddr;