fixed a simple error handling issue in mio_svc_htts_dothr()

This commit is contained in:
hyung-hwan 2020-07-27 10:30:16 +00:00
parent 7f9ac81497
commit 0d9347eb21
2 changed files with 2 additions and 2 deletions

View File

@ -859,7 +859,7 @@ static void on_htts_thr_request (mio_t* mio, mio_dev_thr_iopair_t* iop, mio_svc_
return; 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, "Content-Type: text/html\r\n\r\n");
fprintf (fp, "request path = %s\n", tfi->req_path); fprintf (fp, "request path = %s\n", tfi->req_path);

View File

@ -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; 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.server_addr = cli->sck->localaddr;
tfs->tfi.client_addr = cli->sck->remoteaddr; tfs->tfi.client_addr = cli->sck->remoteaddr;