Project

General

Profile

Bug #1114 ยป http_resp.c.patch

temp fix - Terminar, 2007-04-16 19:27

View differences:

http_resp.c_ 2007-04-12 12:48:30.000000000 +0200
206 206
	http_resp_ctx_t context;
207 207
	parse_status_t ret = PARSE_UNSET;
208 208
	int last_token_id = 0;
209
	int tpRet=0;
209 210

  
210 211
	if(!cq->first) return PARSE_NEED_MORE;
211 212
	t.cq = cq;
......
227 228
	http_resp_parserTrace(stderr, "http-response: ");
228 229
#endif
229 230

  
230
	while((1 == http_resp_tokenizer(&t, &token_id, token)) && context.ok) {
231
		http_resp_parser(pParser, token_id, token, &context);
232

  
233
		token = buffer_pool_get(context.unused_buffers);
234

  
235
		/* CRLF CRLF ... the header end sequence */
236
		if (last_token_id == TK_CRLF &&
237
		    token_id == TK_CRLF) break;
238

  
239
		last_token_id = token_id;
231
	tpRet = 1;
232
	while(1 == tpRet && context.ok) {
233
		tpRet = http_resp_tokenizer(&t, &token_id, token);		
234
		if (tpRet)
235
		{
236
		    http_resp_parser(pParser, token_id, token, &context);
237

  
238
		    token = buffer_pool_get(context.unused_buffers);
239

  
240
		    /* CRLF CRLF ... the header end sequence */
241
		    if (last_token_id == TK_CRLF &&
242
			token_id == TK_CRLF) break;
243

  
244
		    last_token_id = token_id;
245
		} else
246
		{
247
		    context.ok = 0;
248
		}
240 249
	}
241 250

  
242 251
	/* oops, the parser failed */
    (1-1/1)