diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-11-09 23:48:25 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-11-10 01:01:56 +0100 |
commit | c49d205ae021d9e02e0466905d4aac49665b2b19 (patch) | |
tree | 01bf4aeb2727962f3beeefe1cfa9a5f628d0583a /lib/urldata.h | |
parent | 7ae59838f0b9af600f3936485ad45de86bd3435f (diff) | |
download | curl-c49d205ae021d9e02e0466905d4aac49665b2b19.tar.gz |
http_proxy: use enum with state names for 'keepon'bagder/http-proxy-keepon
To make the code clearer, change the 'keepon' from an int to an enum
with better state names.
Reported-by: Niranjan Hasabnis
Bug: https://curl.se/mail/lib-2020-11/0026.html
Closes #6193
Diffstat (limited to 'lib/urldata.h')
-rw-r--r-- | lib/urldata.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/urldata.h b/lib/urldata.h index 4a2a97afc..a3c2b3cf3 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -802,7 +802,11 @@ struct proxy_info { /* struct for HTTP CONNECT state data */ struct http_connect_state { struct dynbuf rcvbuf; - int keepon; + enum keeponval { + KEEPON_DONE, + KEEPON_CONNECT, + KEEPON_IGNORE + } keepon; curl_off_t cl; /* size of content to read and ignore */ enum { TUNNEL_INIT, /* init/default/no tunnel state */ |