Send Image via HTTP header

hanskallor
Posts: 4
Joined: Tue Mar 05, 2019 5:58 pm

Send Image via HTTP header

Postby hanskallor » Tue Mar 05, 2019 6:19 pm

Hi Forum,

I want to receive an image via http in my server.

to get the length of my header value I use:
  1.  size_t httpd_req_get_hdr_value_len(httpd_req_t *r, const char *field)
my problem is that the value is to long and my server throws an error (the Headers field is to long)
  1. W (17168) httpd_parse: parse_block: response uri/header too big
  2. W (17168) httpd_txrx: httpd_resp_send_err: 431 Request Header Fields Too Large - Header fields are too long for server to interpret
  3. W (17188) httpd_parse: parse_block: incomplete (0/128) with parser error = 16
  4. W (17188) httpd_txrx: httpd_resp_send_err: 400 Bad Request - Server unable to understand request due to invalid syntax
  5. W (17208) httpd_parse: parse_block: incomplete (0/78) with parser error = 16
  6. W (17208) httpd_txrx: httpd_resp_send_err: 400 Bad Request - Server unable to understand request due to invalid syntax
  7. W (17218) httpd_txrx: httpd_sock_err: error in send : 104
My question is.

How can I send a long Header value? Do I have to receive chunks and stitch them together to one long string?

One more thing -> how long is the max. header value I can receive?

Many thanks for your help ;) .

hanskallor
Posts: 4
Joined: Tue Mar 05, 2019 5:58 pm

Re: Send Image via HTTP header

Postby hanskallor » Wed Mar 06, 2019 7:08 pm

Hi,

I solved the problem by editing
  1. CONFIG_HTTPD_MAX_REQ_HDR_LEN
in the sdconfig file

Who is online

Users browsing this forum: No registered users and 73 guests