lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] http_client.c: add custom header at run-time


From: address@hidden
Subject: Re: [lwip-users] http_client.c: add custom header at run-time
Date: Tue, 19 Feb 2019 21:51:36 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0

Am 19.02.2019 um 14:19 schrieb Giuseppe Modugno:
I'm trying to implement a dynamic DNS client with lwip. The update
protocol[1] is very simple: it's HTTP based, so I thought to use
http_client.c that comes with lwip project.

Unfortunately this protocol needs the header "Authorization" in the
request. It seems http_client.c doesn't support additional headers from
"User-Agent" (customizable through macro), "Accept: */*", "Host"
(generated at run-time) and "Connection: Close".

What do you suggest to add the "Authorization" header in the request?
Note that this header isn't static, because it depends on username and
password (it must be calculated at run-time).

In my application I will use http_client.c for other connections where
"Authorization" header shouldn't be present. So this header should be
added or not at run-time for each connection.

I guess the best way would be to modify the httpd code to somehow accept pointer + length to a string providing the additional headers that could then be integrated into the request.

Patches providing functionality are welcome!

Regards,
Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]