touched up code a bit for building with watcom.
This commit is contained in:
		| @ -1509,14 +1509,14 @@ static int task_main_cgi ( | ||||
| 	x = qse_pio_init ( | ||||
| 		&cgi->pio, httpd->mmgr, (const qse_char_t*)xpath, | ||||
| 		cgi->env, pio_options); | ||||
| 	if (xpath != cgi->path && xpath != &cgi->fnc) QSE_MMGR_FREE (httpd->mmgr, xpath); | ||||
| 	if (xpath != cgi->path &&  | ||||
| 	    xpath != (qse_mchar_t*)&cgi->fnc) QSE_MMGR_FREE (httpd->mmgr, xpath); | ||||
|  | ||||
| 	if (x <= -1) | ||||
| 	{ | ||||
| 		qse_pio_errnum_t errnum; | ||||
|  | ||||
| 		errnum = qse_pio_geterrnum (&cgi->pio); | ||||
|  | ||||
| 		if (errnum == QSE_PIO_ENOENT) http_errnum = 404; | ||||
| 		else if (errnum == QSE_PIO_EACCES) http_errnum = 403; | ||||
|  | ||||
| @ -1674,4 +1674,3 @@ qse_httpd_task_t* qse_httpd_entaskcgi ( | ||||
| 		((arg.shebang.len + 1) * QSE_SIZEOF(*arg.shebang.ptr)) | ||||
| 	); | ||||
| } | ||||
|  | ||||
|  | ||||
| @ -1053,7 +1053,10 @@ static int task_init_proxy ( | ||||
| 		{ | ||||
| 			/* the query path has been percent-decoded. get the original qpath*/ | ||||
|  | ||||
| 			/* | ||||
| 		#if 0 | ||||
| 			/* percent-encoding back doesn't work all the time because | ||||
| 			 * some characters not encoded in the original request may get | ||||
| 			 * encoded. some picky servers has thrown errors for such requests */ | ||||
| 			qse_mchar_t* qpath, * qpath_enc; | ||||
| 			qse_size_t x; | ||||
|  | ||||
| @ -1066,9 +1069,10 @@ static int task_init_proxy ( | ||||
| 			if (qpath != qpath_enc) QSE_MMGR_FREE (httpd->mmgr, qpath_enc); | ||||
|  | ||||
| 			if (x == (qse_size_t)-1) goto nomem_oops; | ||||
| 			*/ | ||||
|  | ||||
| 		#else | ||||
| 			/* using the original query path minimizes the chance of side-effects */ | ||||
| 			if (qse_mbs_cat (proxy->reqfwdbuf, qse_htre_getorgqpath(arg->req)) == (qse_size_t)-1) goto nomem_oops; | ||||
| 		#endif | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
|  | ||||
		Reference in New Issue
	
	Block a user