Closed BigVan closed 6 months ago
op->req.headers.insert("User-Agent", USERAGENT);
op->req.headers.insert("Connection", "keep-alive");
op->req.headers.merge(m_common_headers);
@liulanzheng Maybe we should merge common headers first, then insert others like User-Agent and Connection? So that one can define a customized user agent by adding it to common headers, and which precludes the following insertion of another user agent (the default one).
Shall we provide a method() to customize HTTP UserAgent? Add Custom / Descriptive HTTP User-Agent for Overlaybd
Now it is a static variable. https://github.com/alibaba/PhotonLibOS/blob/main/net/http/client.cpp#L253