added more cgi related code
This commit is contained in:
		| @ -45,8 +45,9 @@ enum qse_htrd_option_t | ||||
| { | ||||
| 	QSE_HTRD_SKIPEMPTYLINES  = (1 << 0), /**< skip leading empty lines before the initial line */ | ||||
| 	QSE_HTRD_SKIPINITIALLINE = (1 << 1), /**< skip processing an initial line */ | ||||
| 	QSE_HTRD_REQUEST         = (1 << 2), /**< parse input as a request */ | ||||
| 	QSE_HTRD_RESPONSE        = (1 << 3)  /**< parse input as a response */ | ||||
| 	QSE_HTRD_HURRIED         = (1 << 2), /**< trigger a callback also after headers without processing contents */ | ||||
| 	QSE_HTRD_REQUEST         = (1 << 3), /**< parse input as a request */ | ||||
| 	QSE_HTRD_RESPONSE        = (1 << 4)  /**< parse input as a response */ | ||||
| }; | ||||
|  | ||||
| typedef enum qse_htrd_option_t qse_htrd_option_t; | ||||
| @ -96,15 +97,6 @@ struct qse_htrd_t | ||||
| 		void* chl; | ||||
| 	} fed;  | ||||
|  | ||||
| #if 0 | ||||
| 	struct | ||||
| 	{ | ||||
| 		/* temporary space to store a key and value pair | ||||
| 		 * during the call to qse_http_scanqparamstr() */ | ||||
| 		qse_htob_t qparam;  | ||||
| 	} tmp; | ||||
| #endif | ||||
|  | ||||
| 	enum  | ||||
| 	{ | ||||
| 		QSE_HTRD_RETYPE_Q, | ||||
|  | ||||
| @ -35,23 +35,27 @@ struct qse_htre_t | ||||
| 	qse_http_version_t version; | ||||
|  | ||||
| 	int qmethod_or_sstatus;  | ||||
| 	qse_htob_t qpath_or_smesg; | ||||
| 	qse_htob_t qparam; | ||||
| 	qse_mbs_t qpath_or_smesg; | ||||
| 	qse_mbs_t qparam; | ||||
|  | ||||
| 	/* special attributes derived from the header */ | ||||
| 	struct | ||||
| 	{ | ||||
| 		int chunked;		 | ||||
| 		int content_length; | ||||
| 		int content_length_set; | ||||
| 		qse_size_t content_length; | ||||
| 		int connection_close; | ||||
| 		int expect_continue; | ||||
|  | ||||
| 		/* indicates if the content has been filled */ | ||||
| 		int hurried; | ||||
| 	} attr; | ||||
|  | ||||
| 	/* header table */ | ||||
| 	qse_htb_t hdrtab; | ||||
| 	 | ||||
| 	/* content octets */ | ||||
| 	qse_htob_t content; | ||||
| 	qse_mbs_t content; | ||||
|  | ||||
| 	/* if set, the rest of the contents are discarded */ | ||||
| 	int discard; | ||||
| @ -140,13 +144,13 @@ void qse_htre_clear ( | ||||
|  | ||||
| int qse_htre_setstrfromcstr ( | ||||
| 	qse_htre_t*        re, | ||||
| 	qse_htob_t*        str, | ||||
| 	qse_mbs_t*         str, | ||||
| 	const qse_mcstr_t* cstr | ||||
| ); | ||||
|  | ||||
| int qse_htre_setstrfromxstr ( | ||||
| 	qse_htre_t*        re, | ||||
| 	qse_htob_t*        str, | ||||
| 	qse_mbs_t*         str, | ||||
| 	const qse_mxstr_t* xstr | ||||
| ); | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user