ESP32 : HTTP_HEADER: Buffer length is small to fit all the headers

afaqkhan
Posts: 1
Joined: Sat Oct 21, 2023 7:36 am

ESP32 : HTTP_HEADER: Buffer length is small to fit all the headers

Postby afaqkhan » Sat Oct 21, 2023 7:50 am

Helllo, i am doing project on esp32 using espidf.

I am doing https based communication with thingsboard. i have demo account and i have added public cert in my project, also the jwd token of my thingsboard account.
(Before that i have done https based communication with back4app get req and stored it in buffer and store it worked fine)
i am doing GET request here with thingsboard. Everything is good but i get the error like

E (7484) HTTP_HEADER: Buffer length is small to fit all the headers
W (12494) HTTP_CLIENT: Connection timed out before data was received


now i have tried all the option like increasing buffer size in conf structure as below

Code: Select all

                                     .cert_pem          = (char *)wordtime_cert,
                                             .timeout_ms        = 10 * 100,
                                             .keep_alive_enable = true,
                                            .buffer_size       = 8192,
but did not worked i have tried different codes in my project used native request but i always get this error:

from swagger i checked what is the response header of this url that i am making get req i got:
Response headers
cache-control: no-cache,no-store,max-age=0,must-revalidate
content-type: application/json
date: Fri,20 Oct 2023 19:10:54 GMT
expires: 0
pragma: no-cache
vary: Origin,Access-Control-Request-Method,Access-Control-Request-Headers
x-content-type-options: nosniff
x-xss-protection: 1; mode=block


this is the response header i got from swagger.

plz help its been 4 days i am getting this error..

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 : HTTP_HEADER: Buffer length is small to fit all the headers

Postby ESP_Sprite » Sun Oct 22, 2023 12:02 am

The http server also has a buffer, specifically for headers. You can adjust that in Menuconfig somewhere.

ESP_Mahavir
Posts: 190
Joined: Wed Jan 24, 2018 6:51 am

Re: ESP32 : HTTP_HEADER: Buffer length is small to fit all the headers

Postby ESP_Mahavir » Tue Oct 24, 2023 9:30 am

Hello,

Please try increasing the HTTP transmit buffer size from the client config. Please refer here: https://github.com/espressif/esp-idf/bl ... ent.h#L149

This should fix the problem.

Thanks.

Who is online

Users browsing this forum: Baidu [Spider] and 82 guests