HTTP业务层修复获得content-length方法与tango cache client 接口不兼容的问题。
This commit is contained in:
@@ -61,7 +61,6 @@ static char* read_http1_hdr(const char* hdr, const char* field_name)
|
||||
}
|
||||
void cache_query_free_meta(struct cached_meta* meta)
|
||||
{
|
||||
FREE(&meta->content_length);
|
||||
FREE(&meta->content_type);
|
||||
FREE(&meta);
|
||||
return;
|
||||
@@ -89,7 +88,7 @@ struct cached_meta* cache_query_result_get_header(future_result_t * result)
|
||||
return NULL;
|
||||
}
|
||||
meta= ALLOC(struct cached_meta, 1);
|
||||
meta->content_length=read_http1_hdr((const char*)cache_result->data_frag, "content-length");
|
||||
meta->content_length=cache_result->tlength;
|
||||
meta->content_type=read_http1_hdr((const char*)cache_result->data_frag, "content-type");
|
||||
return meta;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user