doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

`CURLINFO_HEADER_OUT` is "defined" twice in the manual

Open Girgias opened this issue 1 year ago • 2 comments

This can give false positives about a constant having incorrect linking.

Not sure how to handle the markup that you created @Ayesh, do you have any ideas/opinions @haszi?

Girgias avatar Nov 17 '24 18:11 Girgias

CURLINFO_HEADER_OUT isn't a Curl option, but we were using it for ages now (with a custom debug handler to catch and store the output headers). All use cases for this constant in existing documents should be referring to the Curl option; not the new use case with the CURLOPT_DEBUGFUNCTION option.

I thought about this when working on #4069, because the context for CURLINFO_HEADER_OUT in the CURLOPT_DEBUGFUNCTION callback is different. So, all references to that constant syntax go like this:

<varlistentry xml:id="constant.curlinfo-header-out-debug">
          <term>
           <constant linkend="constant.curlinfo-header-out-debug">CURLINFO_HEADER_OUT</constant>

For curl_setopt($ch, CURLINFO_HEADER_OUT) use case, bare <constant>CURLINFO_HEADER_OUT</constant> should continue refer to the old use case. Any documents that want to link to the new CURLINFO_HEADER_OUT constant context can link to it as <constant linkend="constant.curlinfo-header-out-debug">CURLINFO_HEADER_OUT</constant>.

Ayesh avatar Nov 17 '24 19:11 Ayesh

This is unfortunate but I think we can make the markup Ayesh is proposing work in PhD.

haszi avatar Nov 24 '24 20:11 haszi