# Packetbeat: http.content\_lenth fields is for request or response

**URL:** <https://discuss.elastic.co/t/packetbeat-http-content-lenth-fields-is-for-request-or-response/46468>\
**Category:** Beats\
**Tags:** packetbeat\
**Created:** [April 6, 2016, 4:23am UTC](https://discuss.elastic.co/t/packetbeat-http-content-lenth-fields-is-for-request-or-response/46468 "2016-04-06T04:23:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![krushnat\_khawale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krushnat_khawale/32/6652_2.png) [@krushnat\_khawale](https://discuss.elastic.co/u/krushnat_khawale)\
**Post date:** [April 6, 2016, 4:23am UTC](https://discuss.elastic.co/t/packetbeat-http-content-lenth-fields-is-for-request-or-response/46468/1 "2016-04-06T04:23:04Z")

</div>

Hello **{ ES World },**

The field, **http.content\_length** in HTTP field list, whether it is **request** content length  
**or** it is **response** content length?

> As we want to dashboard, Responses based on their sizes; we're gonna need this field.

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [April 6, 2016, 5:08am UTC](https://discuss.elastic.co/t/packetbeat-http-content-lenth-fields-is-for-request-or-response/46468/2 "2016-04-06T05:08:35Z")

</div>

It looks like `http.content_length` is from the response's header.

Source: [https://github.com/elastic/beats/blob/master/packetbeat/protos/http/http.go#L460](https://github.com/elastic/beats/blob/master/packetbeat/protos/http/http.go#L460)

---

<div class="post-metadata">

**Author:** ![monica](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monica/32/3696_2.png) [@monica](https://discuss.elastic.co/u/monica)\
**Post date:** [April 6, 2016, 12:57pm UTC](https://discuss.elastic.co/t/packetbeat-http-content-lenth-fields-is-for-request-or-response/46468/3 "2016-04-06T12:57:23Z")

</div>

You are right. It's ambiguous at the moment. I created a new [GitHub issue](https://github.com/elastic/beats/issues/1332) with a potential solution for this. Please let me know what you think.

---

<div class="post-metadata">

**Author:** ![talk2cshah](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@talk2cshah](https://discuss.elastic.co/u/talk2cshah)\
**Post date:** [April 7, 2016, 6:01am UTC](https://discuss.elastic.co/t/packetbeat-http-content-lenth-fields-is-for-request-or-response/46468/4 "2016-04-07T06:01:21Z")

</div>

I agree @monica

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 9:53pm UTC](https://discuss.elastic.co/t/packetbeat-http-content-lenth-fields-is-for-request-or-response/46468/5 "2017-07-05T21:53:43Z")

</div>


