Skip to content

http: Don't expose function definitions when components are disabled - #3861

Closed
captain-caveman2k wants to merge 2 commits into
curl:masterfrom
captain-caveman2k:exposure
Closed

http: Don't expose function definitions when components are disabled#3861
captain-caveman2k wants to merge 2 commits into
curl:masterfrom
captain-caveman2k:exposure

Conversation

@captain-caveman2k

Copy link
Copy Markdown
Contributor

As per other header files. For example: http.h and http_ntlm.h.

There is no point in exposing the functions definitions unnecessarily when components are disabled.

This is more of a tidy up for consistency rather than to fix an actual (existing) issue. As the current code stands these header files would only cause a problem if a libcurl developer tried to a) include them in non HTTP code or b) use the HTTP negotiate functions from outside the negotiate code in http.c - prior to this commit this would cause a linker error rather than a compilation error as the function would be defined but not exist.

@jay

jay commented May 11, 2019

Copy link
Copy Markdown
Member

One CI error seems legit
https://travis-ci.org/curl/curl/jobs/530747966#L3427

@captain-caveman2k

captain-caveman2k commented May 11, 2019

Copy link
Copy Markdown
Contributor Author

Cheers @jay

It does beg the question, why is that clean up there?

It's only the HTTP digest clean up, and none of the other HTTP authentication mechanisms (NTLM and Negotiate for example) and non off the SASL clean up functions either.

@bagder

bagder commented May 11, 2019

Copy link
Copy Markdown
Member

It fixed a bug! See 9caa3e2 (from #2272 fixed #2255)

@captain-caveman2k

Copy link
Copy Markdown
Contributor Author

Cheers @bagder

I wonder if that bug could potentially exists for the other mechanisms?

@bagder

bagder commented May 11, 2019

Copy link
Copy Markdown
Member

Perhaps but we've had no such reports. Also, Digest is different than most of the other auth methods curl supports in that it has a state and yet survives connections so this bug can very well has been unique for Digest.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

3 participants