summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2020-03-30 00:57:30 +0200
committerMark Wielaard <mark@klomp.org>2020-03-30 00:57:30 +0200
commit7ddceee2b6b0a3fe752a2e8cc5d5cfd0f45d6897 (patch)
tree80e4f772ed1c70bb1f7f493384277bdbb85e105f /doc
parent03bb9dbb2d2ee515e3daee94ae1e2d36aeaedec7 (diff)
downloadelfutils-7ddceee2b6b0a3fe752a2e8cc5d5cfd0f45d6897.tar.gz
debuginfod: Document and sanity check debuginfod_add_http_header format.
Document and sanity check the format of the header string form that can be passed to debuginfod_add_http_header. It should contain precisely one colon, which cannot be the first or last character. And the function should only be used to add optional headers, not replace any existing standard ones. Anything else isn't supported. Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/ChangeLog5
-rw-r--r--doc/debuginfod_find_debuginfo.310
2 files changed, 14 insertions, 1 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 068a1957..f598b7f2 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-29 Mark Wielaard <mark@klomp.org>
+
+ * debuginfod_find_debuginfo.3 (HTTP HEADER): Document the expected
+ header format and purpose.
+
2020-03-28 Frank Ch. Eigler <fche@redhat.com>
* debuginfod.8: Document valid --port=NUM range, excludes 0.
diff --git a/doc/debuginfod_find_debuginfo.3 b/doc/debuginfod_find_debuginfo.3
index 1c7c4991..d9717d73 100644
--- a/doc/debuginfod_find_debuginfo.3
+++ b/doc/debuginfod_find_debuginfo.3
@@ -171,7 +171,15 @@ may be called with strings of the form
.BR \%"Header:\~value" .
These strings are copied by the library. A zero return value
indicates success, but out-of-memory conditions may result in
-a non-zero \fI-ENOMEM\fP.
+a non-zero \fI-ENOMEM\fP. If the string is in the wrong form
+\fI-EINVAL\fP will be returned.
+
+Note that the current debuginfod-client library implementation uses
+libcurl, but you shouldn't rely on that fact. Don't use this function
+for replacing any standard headers, except for the User-Agent mentioned
+below. The only supported usage of this function is for adding an
+optional header which might or might not be passed through to the
+server for logging purposes only.
By default, the library adds a descriptive \fIUser-Agent:\fP
header to outgoing requests. If the client application adds