openziti / tlsuv

TLS and HTTP(s) client library for libuv
https://docs.openziti.io/tlsuv/
MIT License
43 stars 5 forks source link

support dup http resp headers #57

Closed rentallect closed 4 years ago

ekoby commented 4 years ago

replacing of the header via set_ is needed for request headers, so that individual request can override client/default headers

I would prefer a separate function to add a header and used it for responses. we can even call it add_http_header

rentallect commented 4 years ago

I modified set_http_headern not set_http_header. The set_http_headern func is only reachable during response parsing, and set_http_header is only used during request writing, so we should be fine, right?

ekoby commented 4 years ago

I modified set_http_headern not set_http_header. The set_http_headern func is only reachable during response parsing, and set_http_header is only used during request writing, so we should be fine, right?

maybe it works, but I don't want set_http_headern and set_http_header to have different semantics. can you rename the changed function to add_...?