mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
client: flag defeating default cache-control headers added
This commit is contained in:
parent
c8811bfe48
commit
d425691d9f
2 changed files with 5 additions and 3 deletions
|
@ -48,6 +48,7 @@ enum lws_client_connect_ssl_connection_flags {
|
|||
LCCSCF_HTTP_MULTIPART_MIME = (1 << 10),
|
||||
LCCSCF_HTTP_X_WWW_FORM_URLENCODED = (1 << 11),
|
||||
LCCSCF_HTTP_NO_FOLLOW_REDIRECT = (1 << 12),
|
||||
LCCSCF_HTTP_NO_CACHE_CONTROL = (1 << 13),
|
||||
|
||||
LCCSCF_PIPELINE = (1 << 16),
|
||||
/**< Serialize / pipeline multiple client connections
|
||||
|
|
|
@ -1195,9 +1195,10 @@ lws_generate_client_handshake(struct lws *wsi, char *pkt)
|
|||
p += lws_snprintf(p, lws_ptr_diff_size_t(end, p),
|
||||
"%s %s HTTP/1.1\x0d\x0a", meth, path);
|
||||
|
||||
p += lws_snprintf(p, lws_ptr_diff_size_t(end, p),
|
||||
"Pragma: no-cache\x0d\x0a"
|
||||
"Cache-Control: no-cache\x0d\x0a");
|
||||
if (!(wsi->flags & LCCSCF_HTTP_NO_CACHE_CONTROL))
|
||||
p += lws_snprintf(p, lws_ptr_diff_size_t(end, p),
|
||||
"Pragma: no-cache\x0d\x0a"
|
||||
"Cache-Control: no-cache\x0d\x0a");
|
||||
|
||||
p += lws_snprintf(p, lws_ptr_diff_size_t(end, p),
|
||||
"Host: %s\x0d\x0a",
|
||||
|
|
Loading…
Add table
Reference in a new issue