reverted wrong changes in htre.c
This commit is contained in:
		| @ -89,8 +89,9 @@ void mio_htre_fini (mio_htre_t* re) | |||||||
| 	{ | 	{ | ||||||
| 		mio_freemem (re->mio, re->orgqpath.buf); | 		mio_freemem (re->mio, re->orgqpath.buf); | ||||||
| 		re->orgqpath.buf = MIO_NULL; | 		re->orgqpath.buf = MIO_NULL; | ||||||
| 		re->orgqpath.len = 0; |  | ||||||
| 		re->orgqpath.capa = 0; | 		re->orgqpath.capa = 0; | ||||||
|  | 		re->orgqpath.ptr = MIO_NULL; | ||||||
|  | 		re->orgqpath.len = 0; | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
| @ -109,13 +110,8 @@ void mio_htre_clear (mio_htre_t* re) | |||||||
| 	re->state = 0; | 	re->state = 0; | ||||||
| 	re->flags = 0; | 	re->flags = 0; | ||||||
|  |  | ||||||
| 	if (re->orgqpath.buf)  | 	re->orgqpath.ptr = MIO_NULL; | ||||||
| 	{ | 	re->orgqpath.len = 0; | ||||||
| 		mio_freemem (re->mio, re->orgqpath.buf); |  | ||||||
| 		re->orgqpath.buf = MIO_NULL; |  | ||||||
| 		re->orgqpath.len = 0; |  | ||||||
| 		re->orgqpath.capa = 0; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	MIO_MEMSET (&re->version, 0, MIO_SIZEOF(re->version)); | 	MIO_MEMSET (&re->version, 0, MIO_SIZEOF(re->version)); | ||||||
| 	MIO_MEMSET (&re->attr, 0, MIO_SIZEOF(re->attr)); | 	MIO_MEMSET (&re->attr, 0, MIO_SIZEOF(re->attr)); | ||||||
| @ -293,8 +289,9 @@ int mio_htre_perdecqpath (mio_htre_t* re) | |||||||
| 			if (re->orgqpath.buf) | 			if (re->orgqpath.buf) | ||||||
| 			{ | 			{ | ||||||
| 				mio_freemem (re->mio, re->orgqpath.buf); | 				mio_freemem (re->mio, re->orgqpath.buf); | ||||||
| 				re->orgqpath.len = 0; |  | ||||||
| 				re->orgqpath.capa = 0; | 				re->orgqpath.capa = 0; | ||||||
|  | 				re->orgqpath.ptr = MIO_NULL; | ||||||
|  | 				re->orgqpath.len = 0; | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
| 			re->orgqpath.buf = mio_dupbchars(re->mio, re->u.q.path.ptr, re->u.q.path.len); | 			re->orgqpath.buf = mio_dupbchars(re->mio, re->u.q.path.ptr, re->u.q.path.len); | ||||||
|  | |||||||
| @ -119,6 +119,8 @@ if (mio_htre_getcontentlen(req) > 0) | |||||||
| 		} | 		} | ||||||
| 		else  | 		else  | ||||||
| 		{ | 		{ | ||||||
|  | //mio_svc_htts_sendstatus (htts, csck, 500, mth, mio_htre_getversion(req), (req->flags & MIO_HTRE_ATTR_KEEPALIVE), MIO_NULL); | ||||||
|  | //return 0; | ||||||
| #if 0 | #if 0 | ||||||
| 			if (mth == MIO_HTTP_POST && | 			if (mth == MIO_HTTP_POST && | ||||||
| 			    !(req->flags & MIO_HTRE_ATTR_LENGTH) && | 			    !(req->flags & MIO_HTRE_ATTR_LENGTH) && | ||||||
| @ -584,6 +586,11 @@ void mio_svc_htts_sendstatus (mio_svc_htts_t* htts, mio_dev_sck_t* csck, int sta | |||||||
| 	{ | 	{ | ||||||
| 		mio_dev_sck_halt (csck); | 		mio_dev_sck_halt (csck); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	if (!keepalive) | ||||||
|  | 	{ | ||||||
|  | 		mio_dev_sck_write(csck, MIO_NULL, 0, MIO_NULL, MIO_NULL); /* arrange to close the writing end */ | ||||||
|  | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user