| 400 | } |
| 401 | |
| 402 | void http_header::add_res_cookie(const HTTP_HDR_ENTRY& entry) |
| 403 | { |
| 404 | if (entry.value || !(*entry.value)) { |
| 405 | return; |
| 406 | } |
| 407 | |
| 408 | HttpCookie* cookie = dbuf_->create |
| 409 | <HttpCookie, const char*, const char*, dbuf_guard*> |
| 410 | (entry.name, entry.value, dbuf_); |
| 411 | |
| 412 | // ͨ�� setCookie ������� value ����Ч�ԣ���� value ֵ��Ч���� |
| 413 | // �� cookies_ �����ӣ���Ϊ cookie ���� dbuf_ �Ϸ���ģ����Դ��ڴ��� |
| 414 | // ���ֹ��ͷţ��� dbuf_ ����ʱ���ڴ���Ȼ���ͷ� |
| 415 | if (cookie->setCookie(entry.value)) { |
| 416 | cookies_.push_back(cookie); |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | void http_header::date_format(char* out, size_t size, time_t t) |
| 421 | { |