Commit Graph

2206 Commits

Author SHA1 Message Date
Daniel Stenberg
6afac4f992
libcurl-opts: mention pipelining less
libcurl has not supported HTTP pipelining since many years. Remove a few
(more) mentions of the feature.

Closes #13254
2024-04-01 14:41:52 +02:00
Daniel Stenberg
1b2978403f
CURLOPT_POSTFIELDS.md: used for MQTT as well
Closes #13189
2024-03-26 14:09:06 +01:00
Daniel Stenberg
e3fe020089
docs/libcurl: generate PROTOCOLS from meta-data
Remove the PROTOCOLS section from the source files completely and
instead generate them based on the header data in the curldown files.

It also generates TLS backend information for options marked for TLS as
protocol.

Closes #13175
2024-03-23 18:13:03 +01:00
Daniel Stenberg
7bc61bf469
CURLMOPT_MAX*: mention what happens if changed mid-transfer
For CURLMOPT_MAXCONNECTS and CURLMOPT_MAX_HOST_CONNECTIONS

Ref: #13158
Closes #13176
2024-03-23 11:31:36 +01:00
Daniel Stenberg
c5775007d3
docs/libcurl: add TLS backend info for all TLS options
All man pages that are listed to be for TLS now must also specify
exactly what TLS backends the option works for, or use All if they all
work.

cd2nroff makes sure this is done and that the listed backends exist.

Closes #13168
2024-03-22 14:07:55 +01:00
Daniel Stenberg
3ff3c0925d
docs/libcurl: cleanups
- CURLINFO_TLS_SESSION.md: remove mention of NSS
- CURLINFO_TLS_SSL_PTR.md: remove NSS leftover
- CURLOPT_CAINFO.md: drop mention of backends not supporting this
- CURLOPT_CAPATH.md: wolfSSL also supports this

Closes #13166
2024-03-21 22:36:27 +01:00
Daniel Stenberg
b935fd4a07
docs: make each libcurl man specify protocol(s)
The mandatory header now has a mandatory list of protocols for which the
manpage is relevant.

Most man pages already has a "PROTOCOLS" section, but this introduces a
stricter way to specify the relevant protocols.

cd2nroff verifies that at least one protocol is mentioned (which can be
`*`).

This information is not used just yet, but A) the PROTOCOLS section can
now instead get generated and get a unified wording across all manpages
and B) this allows us to more reliably filter/search for protocol
specific manpages/options.

Closes #13166
2024-03-21 15:27:06 +01:00
Daniel Stenberg
fd1260d492
CURLOPT_INTERFACE.md: remove spurious amp, add see-also
Closes #13149
2024-03-19 13:54:56 +01:00
Viktor Szakats
14d9afdfe7
tidy-up: one comment and EOF newlines
Reviewed-by: Daniel Stenberg
Closes #13108
2024-03-12 15:38:44 +00:00
Daniel Stenberg
f03c85635f
docs: ascii version of manpage without nroff
Create ASCII version of manpage without nroff

 - build src/tool_hugegelp.c from the ascii manpage
 - move the the manpage and the ascii version build to docs/cmdline-opts
 - remove all use of nroff from the build process
 - should make the build entirely reproducible (by avoiding nroff)

 - partly reverts 2620aa9 to build libcurl option man pages one by one
   in cmake because the appveyor builds got all crazy until I did

The ASCII version of the manpage

 - is built with gen.pl, just like the manpage is
 - has a right-justified column making the appearance similar to the previous
   version
 - uses a 4-space indent per level (instead of the old version's 7)
 - does not do hyphenation of words (which nroff does)

History

  We first made the curl build use nroff for building the hugehelp file in
  December 1998, for curl 5.2.

Closes #13047
2024-03-06 15:55:59 +01:00
RainRat
2cd78f525c misc: Fix typos in docs and lib
This fixes miscellaneous typos and duplicated words in the docs, lib
and test comments and a few user facing errorstrings.

Author: RainRat on Github
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Dan Fandrich <dan@coneharvesters.com>
Closes: #13019
2024-03-01 09:59:48 +01:00
Daniel Gustafsson
8d67c61c47 curldown: Fix email address in Copyright
The curldown conversion accidentally replaced daniel@haxx.se with
just daniel.se.  This reverts back to the proper email address in
the curldown docs as well as in a few other stray places where it
was incorrect (while unrelated to curldown).

Reviewed-by: Daniel Stenberg <daniel@haxx.se>
Closes: #12997
2024-02-28 11:28:10 +01:00
Daniel Stenberg
2097a095c9
docs: use present tense
avoid "will", detect "will" as a bad word in the CI

Also line wrapped a bunch of paragraphs

Closes #13001
2024-02-27 09:47:21 +01:00
Daniel Stenberg
f73cb3ebd2
CURLOPT_SSL_CTX_FUNCTION.md: no promises of lifetime after return
... and cleanup other language.

Closes #12999
2024-02-27 09:04:13 +01:00
Daniel Stenberg
cc04c73677
CURLINFO_USED_PROXY: return bool whether the proxy was used
Adds test536 to verify

Closes #12719
2024-02-22 08:38:53 +01:00
Stefan Eissing
f7e598791f
DoH: add trace configuration
- refs #12397 where it is dicussed how to en-/disable verbose output
  of DoH operations
- introducing `struct curl_trc_feat` to track a curl feature for
  tracing
- adding `data->state.feat` optionally pointing to the feature a
  transfer belongs to
- adding trace functions and verbosity checks on features
- using trace feature in DoH code
- documenting `doh` as feature for `--trace-config`

Closes #12411
2024-02-20 14:01:59 +01:00
Stefan Eissing
f0c446ab57
websocket: fix curl_ws_recv()
- when data arrived in several chunks, the collection into
  the passed buffer always started at offset 0, overwriting
  the data already there.

adding test_20_07 to verify fix

- debug environment var CURL_WS_CHUNK_SIZE can be used to
  influence the buffer chunk size used for en-/decoding.

Closes #12945
2024-02-20 13:57:58 +01:00
Daniel Stenberg
ab027d9cbc
docs: dist curl*.1 and install without perl
Drop docs/mk-ca-bundle.1 from the tarball. It can be generated at will.

Closes #12959
Fixes #12921
Reported-by: Michael Forney
2024-02-20 10:35:13 +01:00
Daniel Stenberg
96af350661
libcurl-docs: cleanups
CURLMOPT_SOCKETDATA.md: fix typo
 CURLMOPT_TIMERDATA.md: fix typo
 CURLOPT_COOKIELIST.m: quote strings
 CURLOPT_PREREQFUNCTION.md: quote variable names
 CURLOPT_TCP_NODELAY.md: rephrased to please spell checker
 CURLOPT_WILDCARDMATCH.md: rephrased
 libcurl-tutorial.md: use correct option name
 curl_global_init_mem.md: quote headers
 curl_easy_getinfo.md: use correct symbol names in headers
 curl_global_trace.md: quote some headers
 curl_ws_meta.md: quote struct field names
 libcurl-env.md: quote headers
2024-02-19 11:41:12 +01:00
LeeRiva
ee92f3d227 CURLOPT_POSTQUOTE.md: fix typo
Closes https://github.com/curl/curl/pull/12926
2024-02-18 01:59:45 -05:00
Richard Levitte
b2497a8d15 cmake: fix install for older CMake versions
- Generate the docs install list by using a foreach loop instead of
  LIST:TRANSFORM since older CMake can't handle the latter.

Reported-by: Dan Fandrich

Fixes https://github.com/curl/curl/issues/12920
Closes https://github.com/curl/curl/pull/12922
2024-02-18 01:02:45 -05:00
Stefan Eissing
476adfeac0
multi: add xfer_buf to multi handle
- can be borrowed by transfer during recv-write operation
- needs to be released before borrowing again
- adjustis size to `data->set.buffer_size`
- used in transfer.c readwrite_data()

Closes #12805
2024-02-09 09:43:50 +01:00
Daniel Szmulewicz
1d96828582
CURLOPT_WRITEFUNCTION.md: typo fix
The maximum amount of body data that is <be> passed to the write
callback is defined in the curl.h header file

Closes #12889
2024-02-07 13:36:18 +01:00
Daniel Stenberg
dc3eb678da
badwords: use hostname, not host name
and username, filename - consistently. Fixed the patterns in
badwords.txt to catch these.

Closes #12888
2024-02-07 08:25:52 +01:00
Daniel Stenberg
d94733b447
docs: make curldown do angle brackets like markdown
Make sure we use \< and \> in markdown all over so that it renders
correctly, on GitHub and elsewhere. cd2nroff now outputs a warning if it
finds an unescaled angle bracket.

Ref: #12854
Closes #12869
2024-02-06 08:17:40 +01:00
Daniel Stenberg
80944740e5
docs: fix the --disable-docs for autotools
Follow-up to 541321507e

Closes #12870
2024-02-06 08:09:44 +01:00
Daniel Stenberg
bf411ccd0d
libcurl-security.md: Active FTP passes on the local IP address
Reported-by: Harry Sintonen
Closes #12867
2024-02-06 00:11:39 +01:00
Joel Depooter
aefb0bde4e
docs: add missing slashes to SChannel client certificate documentation
When setting the CURLOPT_SSLCERT option to a certificate thumprint, it
is required to have a backslash between the "store location", "store
name" and "thumbprint" tokens. These slashes were present in the
previous documentation, but were missed in the transition to markdown
documentation.

Closes #12854
2024-02-05 22:55:38 +01:00
Daniel Stenberg
92f8a1686d
docs: remove spurious ampersands from markdown
They were leftovers from the nroff conversion.

Follow-up to eefcc1bda4

Closes #12800
2024-01-26 10:35:56 +01:00
Stefan Eissing
c93f95a5d8
gitignore: the generated libcurl-symbols.md
Closes #12795
2024-01-25 16:34:06 +01:00
Viktor Szakats
a808aab068
cmake: rework options to enable curl and libcurl docs
Rework CMake options for building/using curl tool and libcurl manuals.

- rename `ENABLE_MANUAL` to `ENABLE_CURL_MANUAL`, meaning:
  to build man page and built-in manual for curl tool.

- rename `BUILD_DOCS` to `BUILD_LIBCURL_DOCS`, meaning:
  to build man pages for libcurl.

- `BUILD_LIBCURL_DOCS` now works without having to enable
  `ENABLE_CURL_MANUAL` too.

- drop support for existing CMake-level `USE_MANUAL` option to avoid
  confusion. (It used to work with the effect of current
  `ENABLE_CURL_MANUAL`, but only by accident.)

Assisted-by: Richard Levitte
Ref: #12771
Closes #12773
2024-01-24 23:22:27 +00:00
Daniel Stenberg
e5000e797f
GHA: add a job scanning for "bad words" in markdown
This means words, phrases or things we have decided not to use - words that
are spelled right according to the dictionary but we want to avoid. In the
name of consistency and better documentation.

Closes #12764
2024-01-24 08:44:34 +01:00
Viktor Szakats
2620aa930b
cmake: speed up curldown processing, enable by default
- cmake: enable `BUILD_DOCS` by default (this controls converting and
  installing `.3` files from `.md` sources)

- cmake: speed up generating `.3` files by using a single command per
  directory, instead of a single command per file. This reduces external
  commands by about a thousand. (There remains some CMake logic kicking
  in resulting in 500 -one per file- external `-E touch_nocreate` calls.)

- cd2nroff: add ability to process multiple input files.

- cd2nroff: add `-k` option to use the source filename to form the
  output filename. (instead of the default in-file `Title:` line.)

Follow-up to 3f08d80b22
Follow-up to ea0b575dab #12753
Follow-up to eefcc1bda4 #12730

Closes #12762
2024-01-23 23:06:39 +00:00
Viktor Szakats
3f08d80b22
cmake: add option to disable building docs 2024-01-23 00:29:02 +01:00
Richard Levitte
ea0b575dab
cmake: use curldown to build man pages
This throws away the previous HTML and PDF producers, to mimic what
Makefile.am does as faithfully as possible.

Closes #12753
2024-01-23 00:29:02 +01:00
Daniel Stenberg
1647017826
mksymbolsmanpage.pl: provide references to where the symbol is used 2024-01-23 00:29:02 +01:00
Daniel Stenberg
eefcc1bda4
docs: introduce "curldown" for libcurl man page format
curldown is this new file format for libcurl man pages. It is markdown
inspired with differences:

- Each file has a set of leading headers with meta-data
- Supports a small subset of markdown
- Uses .md file extensions for editors/IDE/GitHub to treat them nicely
- Generates man pages very similar to the previous ones
- Generates man pages that still convert nicely to HTML on the website
- Detects and highlights mentions of curl symbols automatically (when
  their man page section is specified)

tools:

- cd2nroff: converts from curldown to nroff man page
- nroff2cd: convert an (old) nroff man page to curldown
- cdall: convert many nroff pages to curldown versions
- cd2cd: verifies and updates a curldown to latest curldown

This setup generates .3 versions of all the curldown versions at build time.

CI:

Since the documentation is now technically markdown in the eyes of many
things, the CI runs many more tests and checks on this documentation,
including proselint, link checkers and tests that make sure we capitalize the
first letter after a period...

Closes #12730
2024-01-23 00:29:02 +01:00
Daniel Stenberg
48aaab55a5
curl_easy_getinfo.3: remove the wrong time value count
It said "six" time values but they are eight by now. Remove the mention
of the amount.

Closes #12727
2024-01-18 08:57:41 +01:00
Daniel Stenberg
6b930f1bfb
docs: cleanup nroff format use
- remove use of .BI for code snippet
- stop using .br, just do a blank line
- remove use of .PP
- remove use for .sp
- remove backslash in .IP
- use .IP instead of .TP

Closes #12731
2024-01-17 23:20:17 +01:00
Daniel Stenberg
beb2283746
curl_multi_fdset.3: remove mention of null pointer support
... since this funtion has not supported null pointer fd_set arguments since
at least 2006. (That's when I stopped my git blame journey)

Fixes #12691
Reported-by: sfan5 on github
Closes #12692
2024-01-14 14:53:38 +01:00
Daniel Stenberg
5da57193b7
docs: describe and highlight super cookies
Reported-by: Yadhu Krishna M

Closes #12687
2024-01-12 23:55:20 +01:00
Daniel Stenberg
77c3c1a8fb
curl_easy_header.3: tiny language fix
Closes #12672
2024-01-10 09:42:49 +01:00
Daniel Stenberg
69b6953681
CURLOPT_AUTOREFERER.3: mention CURLINFO_REFERER 2023-12-29 00:40:03 +01:00
Daniel Stenberg
6f17ead7b3
CURLINFO_REFERER.3: clarify that it is the *request* header
That libcurl itself sent in the most recent request

Closes #12605
2023-12-29 00:39:54 +01:00
Daniel Stenberg
68f96fc9bf
getinfo: CURLINFO_QUEUE_TIME_T
Returns the time, in microseconds, during which this transfer was held
in a waiting queue before it started "for real". A transfer might be put
in a queue if after getting started, it cannot create a new connection
etc due to set conditions and limits imposed by the application.

Ref: #12293
Closes #12368
2023-12-27 09:28:48 +01:00
Haydar Alaidrus
9faeebca88 CURLOPT_POSTFIELDS.3: fix incorrect C string escape in example
- Escape inner quotes with two backslashes.

Two backslashes escapes the backslash for the man page and will show as
a single backslash.

eg: "{\\"name\\": \\"daniel\\"}" shows as "{\"name\": \"daniel\"}".

Closes https://github.com/curl/curl/pull/12588
2023-12-23 15:04:56 -05:00
Daniel Stenberg
5d2b0faec2
CURLOPT_SSH_*_KEYFILE: clarify
Closes #12554
2023-12-21 16:24:51 +01:00
Daniel Stenberg
dd29622f32
CURLOPT_SERVER_RESPONSE_TIMEOUT_MS: add
Proposed-by: Yifei Kong
Ref: https://curl.se/mail/lib-2023-11/0023.html
Closes #12369
2023-12-18 23:09:30 +01:00
Daniel Stenberg
f58e493e44
curl.h: add CURLE_TOO_LARGE
A new error code to be used when an internal field grows too large, like
when a dynbuf reaches its maximum. Previously it would return
CURLE_OUT_OF_MEMORY for this, which is highly misleading.

Ref: #12268
Closes #12269
2023-12-18 10:34:22 +01:00
Viktor Szakats
ede2e812c2
tidy-up: whitespace
Closes #12484
2023-12-08 03:28:50 +00:00