Skip to content

Commit

Permalink
Merge branch 'bagder:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Man2Dev authored Dec 14, 2023
2 parents f25182a + d782deb commit dd62059
Show file tree
Hide file tree
Showing 79 changed files with 153 additions and 81 deletions.
37 changes: 37 additions & 0 deletions .github/scripts/verify-titles.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/perl

my $sum = shift @ARGV;

# Figure out all files in right order
open(F, "<$sum");
while(<F>) {
if($_ =~ /\[(.*)\]\(([^\)]*)\)/) {
my ($title, $file) = ($1, $2);
push @files, $file;
$title{$file} = $title;
}
}
close(F);

sub check {
my ($f) = @_;
open(F, "<$f");
while(<F>) {
if(/^# (.*)/) {
# verify
if($1 ne $title{$f}) {
printf STDERR "$f says '%s', not '%s' like SUMMARY.md\n",
$1, $title{$f};
$errors++;
}
last;
}
}
close(F);
};

for my $f (@files) {
check($f);
}

exit $errors;
24 changes: 24 additions & 0 deletions .github/workflows/verify-titles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (C) Daniel Stenberg, <[email protected]>, et al.

name: verify-titles
on:
push:
branches:
- master
paths:
- '**.md'
pull_request:
branches:
- master

permissions: {}

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: build pdf
run: .github/scripts/verify-titles.pl SUMMARY.md

8 changes: 4 additions & 4 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Table of contents

* [README](README.md)
* [Introduction](README.md)
* [How to read this book](how-to-read.md)
* [The cURL project](project.md)
* [How it started](project/started.md)
Expand Down Expand Up @@ -33,7 +33,7 @@
* [Source code](source.md)
* [Open Source](source/opensource.md)
* [License](source/opensource/license.md)
* [Copyright and Legal](source/opensource/copyright.md)
* [Copyright](source/opensource/copyright.md)
* [Code layout](source/layout.md)
* [Handling build options](source/options.md)
* [Code style](source/style.md)
Expand Down Expand Up @@ -87,7 +87,7 @@
* [Shell redirects](usingcurl/downloads/redirects.md)
* [Multiple downloads](usingcurl/downloads/multiple.md)
* [My browser shows something else](usingcurl/downloads/browsers.md)
* [Maximum file size](usingcurl/downloads/max-filesize.md)
* [Maximum filesize](usingcurl/downloads/max-filesize.md)
* [Storing metadata in file system](usingcurl/downloads/metadata-fs.md)
* [Raw](usingcurl/downloads/raw.md)
* [Retry](usingcurl/downloads/retry.md)
Expand All @@ -113,7 +113,7 @@
* [HTTP proxy](usingcurl/proxies/http.md)
* [SOCKS proxy](usingcurl/proxies/socks.md)
* [MITM proxy](usingcurl/proxies/mitm.md)
* [Authentication](usingcurl/proxies/auth.md)
* [Proxy authentication](usingcurl/proxies/auth.md)
* [HTTPS proxy](usingcurl/proxies/https.md)
* [Proxy environment variables](usingcurl/proxies/env.md)
* [Proxy headers](usingcurl/proxies/headers.md)
Expand Down
2 changes: 1 addition & 1 deletion bindings.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Bindings for libcurl
# Bindings

Creative people have written bindings or interfaces for various environments
and programming languages. Using one of these allows you to take advantage of
Expand Down
4 changes: 2 additions & 2 deletions bookindex.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
## R
- ranges: [Numerical ranges](cmdline/globbing.md#numerical-ranges), [Downloads](usingcurl/downloads.md#downloads), [Resuming and ranges](usingcurl/downloads/resume.md#resuming-and-ranges), [HTTP with curl](http.md#http-with-curl), [HTTP ranges](http/ranges.md#http-ranges), [Provide a file descriptor](libcurl/callbacks/openclosesocket.md#provide-a-file-descriptor), [Sections](libcurl-http.md#sections), [HTTP response code](libcurl-http/responses.md#http-response-code), [HTTP ranges](libcurl-http/ranges.md#http-ranges)
- --rate: [Request rate limiting](usingcurl/transfers/request-rate.md#request-rate-limiting)
- Read callback: [Read callback](libcurl/callbacks/read.md#read-callback), [All easy options](libcurl/options/all.md#all-easy-options)
- Read callback: [Read callback](libcurl/callbacks/read.md#read-callback), [All easy options](libcurl/options/all.md#all-easy-options), [HTTP POST](libcurl-http/upload.md#http-post)
- redhat: [Redhat and CentOS](get/linux.md#redhat-and-centos)
- redirects: [Long options](cmdline/options.md#long-options), [Separate options per URL](cmdline/urls/options.md#separate-options-per-url), [Config file](cmdline/configfile.md#config-file), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Downloads](usingcurl/downloads.md#downloads), [Download to a file named by the URL](usingcurl/downloads/url-named.md#download-to-a-file-named-by-the-url), [Shell redirects](usingcurl/downloads/redirects.md#shell-redirects), [Provide a custom IP address for a name](usingcurl/connections/name.md#provide-a-custom-ip-address-for-a-name), [Available exit codes](usingcurl/returns.md#available-exit-codes), [HTTP with curl](http.md#http-with-curl), [HTTP redirects](http/redirects.md#http-redirects), [Modify the request method](http/modify/method.md#modify-the-request-method), [Redirects](http/browserlike.md#redirects), [Custom addresses for hosts](libcurl/names.md#custom-addresses-for-hosts), [Available information](libcurl/getinfo.md#available-information), [All easy options](libcurl/options/all.md#all-easy-options), [Submit a login form over HTTP](libcurl/examples/login.md#submit-a-login-form-over-http), [Automatic referrer](libcurl-http/requests.md#automatic-referrer), [Request number](libcurl-http/headerapi.md#request-number)
- RELEASE-NOTES: [scripts](source/layout.md#scripts)
Expand Down Expand Up @@ -391,7 +391,7 @@
- Wireshark: [--trace and --trace-ascii](usingcurl/verbose/trace.md#trace-and---trace-ascii), [Available exit codes](usingcurl/returns.md#available-exit-codes), [SSLKEYLOGFILE](usingcurl/tls/sslkeylogfile.md#sslkeylogfile), [Figure out what a browser sends](http/post/browsersends.md#figure-out-what-a-browser-sends)
- wolfSSH: [SSH libraries](build/deps.md#ssh-libraries), [SCP and SFTP](usingcurl/scpsftp.md#scp-and-sftp), [`<features>`](internals/tests/file-format.md#less-than-features-greater-than)
- wolfSSL: [Commercial support](project/support.md#commercial-support), [lib/vtls](source/layout.md#lib-vtls), [Running DLL based configurations](build/windows.md#running-dll-based-configurations), [Build to use a TLS library](build/tls.md#build-to-use-a-tls-library), [Restrictions](usingcurl/tls/sslkeylogfile.md#restrictions), [SSL context callback](libcurl/callbacks/sslcontext.md#ssl-context-callback), [All easy options](libcurl/options/all.md#all-easy-options), [`<features>`](internals/tests/file-format.md#less-than-features-greater-than)
- Write callback: [Write callback](libcurl/callbacks/write.md#write-callback), [1. The callback approach](libcurl/ws/concept.md#1.-the-callback-approach), [Raw mode](libcurl/ws/options.md#raw-mode), [Write callback](libcurl/ws/read.md#write-callback), [All easy options](libcurl/options/all.md#all-easy-options), [Get a response into memory](libcurl/examples/getinmem.md#get-a-response-into-memory), [Callback considerations](libcurl/cplusplus.md#callback-considerations)
- Write callback: [Write callback](libcurl/callbacks/write.md#write-callback), [1. The callback approach](libcurl/ws/concept.md#1.-the-callback-approach), [Raw mode](libcurl/ws/options.md#raw-mode), [Write callback](libcurl/ws/read.md#write-callback), [All easy options](libcurl/options/all.md#all-easy-options), [Get a simple HTML page](libcurl/examples/get.md#get-a-simple-html-page), [Get a response into memory](libcurl/examples/getinmem.md#get-a-response-into-memory), [Callback considerations](libcurl/cplusplus.md#callback-considerations), [Response body](libcurl-http/responses.md#response-body)
- --write-out: [Write out](usingcurl/verbose/writeout.md#write-out), [Overwriting](usingcurl/downloads/storing.md#overwriting), [HTTP response codes](http/response.md#http-response-codes)
## X
- -X: [Modify the request method](http/modify/method.md#modify-the-request-method), [Modify request target](http/modify/target.md#modify-request-target), [HTTP PUT](http/put.md#http-put), [HTTP cheat sheet](http/cheatsheet.md#http-cheat-sheet)
Expand Down
2 changes: 1 addition & 1 deletion build.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build
# Build curl

The source code for this project is written in a way that allows it to get
compiled and built on just about any operating system and platform, with as
Expand Down
2 changes: 1 addition & 1 deletion build/boringssl.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build curl with boringssl
# BoringSSL

## build boringssl

Expand Down
2 changes: 1 addition & 1 deletion build/tls.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build to use a TLS library
# TLS libraries

To make curl support TLS based protocols, such as HTTPS, FTPS, SMTPS, POP3S,
IMAPS and more, you need to build with a third-party TLS library since curl
Expand Down
2 changes: 1 addition & 1 deletion build/windows.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# On Windows
# Windows

You can build curl on Windows in several different ways. We recommend using
the MSVC compiler from Microsoft or the free and open source mingw
Expand Down
2 changes: 1 addition & 1 deletion cmdline/listopts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# List all command-line options
# List options

curl has more than two hundred command-line options and the number of options
keep increasing over time. Chances are the number of options will reach 250
Expand Down
2 changes: 1 addition & 1 deletion cmdline/passwords.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Passwords and snooping
# Passwords

Passwords are tricky and sensitive. Leaking a password can make someone other
than you access the resources and the data otherwise protected.
Expand Down
2 changes: 1 addition & 1 deletion cmdline/progressmeter.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The progress meter
# Progress meter

curl has a built-in progress meter. When curl is invoked to transfer data
(either uploading or downloading) it can show that meter in the terminal
Expand Down
2 changes: 1 addition & 1 deletion ftp/traversedir.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to traverse directories
# Directory traversing

When doing FTP commands to traverse the remote file system, there are a few
different ways curl can proceed to reach the target file, the file the user
Expand Down
2 changes: 1 addition & 1 deletion ftp/twoconnections.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FTP uses two connections
# Two connections

FTP uses two TCP connections! The first connection is setup by the client when
it connects to an FTP server, and is called the *control connection*. As the
Expand Down
2 changes: 1 addition & 1 deletion get.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Get curl
# Install curl

curl is totally free, open and available. There are numerous ways to get it
and install it for most operating systems and architecture. This section will
Expand Down
13 changes: 12 additions & 1 deletion get/linux.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Get curl for Linux
# Linux

Linux distributions come with "packager managers" that let you install
software that they offer. Most Linux distributions offer curl and libcurl to
Expand Down Expand Up @@ -97,3 +97,14 @@ And to install the libcurl development package:
This package installs the tool, libcurl, headers and pkg-config files etc

emerge net-misc/curl

## Void Linux

With Void Linux you use `xbps-install` to install packages.
To install the curl command-line utility:

xbps-install curl

In order to install the libcurl development package:

xbps-install libcurl-devel
2 changes: 1 addition & 1 deletion get/macos.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Get curl for macOS
# macOS

macOS comes with the curl tool bundled with the operating system since many
years. If you want to upgrade to the latest version shipped by the curl
Expand Down
2 changes: 1 addition & 1 deletion get/windows.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Get curl for Windows
# Windows

Windows 10 comes with the curl tool bundled with the operating system since
version 1804. If you have an older Windows version or just want to upgrade to
Expand Down
2 changes: 1 addition & 1 deletion http/auth.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP authentication
# Authentication

Each HTTP request can be made authenticated. If a server or a proxy want the
user to provide proof that they have the correct credentials to access a URL
Expand Down
2 changes: 1 addition & 1 deletion http/basics.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP protocol basics
# Protocol basics

(This assumes you have read the [Network and protocols](../protocols.md)
section or are otherwise already familiar with protocols.)
Expand Down
2 changes: 1 addition & 1 deletion http/hsts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP Strict Transport Security
# HSTS

HTTP Strict Transport Security, HSTS, is a protocol mechanism that helps to
protect HTTPS servers against man-in-the-middle attacks such as protocol
Expand Down
2 changes: 1 addition & 1 deletion http/method.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP method
# Method

In every HTTP request, there is a method. Sometimes called a verb. The most
commonly used ones are `GET`, `POST`, `HEAD` and `PUT`.
Expand Down
2 changes: 1 addition & 1 deletion http/modify/fragment.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Anchors or fragments
# Fragment

A URL may contain an "anchor", also known as a fragment, which is written with
a pound sign and string at the end of the URL. Like for example
Expand Down
2 changes: 1 addition & 1 deletion http/modify/method.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Modify the request method
# Request method

The first line of an HTTP request includes the *method* - sometimes also
referred to as the verb. When doing a simple GET request as this command line
Expand Down
2 changes: 1 addition & 1 deletion http/modify/target.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Modify request target
# Request target

When given an input URL such as `http://example.com/file`, the path section of
the URL gets extracted and is turned into `/file` in the HTTP request line.
Expand Down
2 changes: 1 addition & 1 deletion http/multipart.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP multipart formposts
# Multipart formposts

A multipart formpost is what an HTTP client sends when an HTML form is
submitted with *enctype* set to "multipart/form-data". It is an HTTP POST
Expand Down
2 changes: 1 addition & 1 deletion http/ranges.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP ranges
# Ranges

What if the client only wants the first 200 bytes out of a remote resource or
perhaps 300 bytes somewhere in the middle? The HTTP protocol allows a client
Expand Down
2 changes: 1 addition & 1 deletion http/redirects.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP redirects
# Redirects

The “redirect” is a fundamental part of the HTTP protocol. The concept was
present and is documented already in the first spec (RFC 1945), published in
Expand Down
2 changes: 1 addition & 1 deletion http/response.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP responses
# Responses

When an HTTP client talks HTTP to a server, the server *will* respond with an
HTTP response message or curl will consider it an error and returns 52 with
Expand Down
2 changes: 1 addition & 1 deletion internals/caches.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Caches and state in libcurl
# Caches and state

When libcurl is used for Internet transfers, it stores data in caches and
state storage in order to do subsequent transfers faster and better.
Expand Down
2 changes: 1 addition & 1 deletion internals/memory-debugging.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Memory Debugging
# Memory debugging

The file `lib/memdebug.c` contains debug-versions of a few functions.
Functions such as `malloc()`, `free()`, `fopen()`, `fclose()`, etc that
Expand Down
2 changes: 1 addition & 1 deletion internals/tests/ci.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Continuous Integration (CI)
# Continuous Integration

For every pull request submitted to the curl project on GitHub and for every
commit pushed to the master branch in the git repository, a vast amount of
Expand Down
2 changes: 1 addition & 1 deletion internals/tests/torture.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Torture tests
# Torture

When curl is built [debug enabled](debug.md), it offers a special kind of
testing. The tests we call **torture** tests. Do not worry, it is not quite as
Expand Down
2 changes: 1 addition & 1 deletion libcurl-http/auth.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP authentication
# Authentication

libcurl supports a wide variety of HTTP authentication schemes.

Expand Down
2 changes: 1 addition & 1 deletion libcurl-http/cookies.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Cookies with libcurl
# Cookies

By default and by design, libcurl makes transfers as basic as possible and
features need to be enabled to get used. One such feature is HTTP cookies,
Expand Down
2 changes: 1 addition & 1 deletion libcurl-http/download.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# libcurl HTTP download
# Download

The GET method is the default method libcurl uses when an HTTP URL is requested
and no particular other method is asked for. It asks the server for a
Expand Down
2 changes: 1 addition & 1 deletion libcurl-http/headerapi.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Header API
# Headers API

libcurl offers an API for iterating over all received HTTP headers and for
extracting the contents from specific ones.
Expand Down
2 changes: 1 addition & 1 deletion libcurl-http/ranges.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP ranges
# Ranges

What if the client only wants the first 200 bytes out of a remote
resource or perhaps 300 bytes somewhere in the middle? The HTTP protocol
Expand Down
2 changes: 1 addition & 1 deletion libcurl-http/requests.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP Requests
# Requests

An HTTP request is what curl sends to the server when it tells the server what
to do. When it wants to get data or send data. All transfers involving HTTP
Expand Down
2 changes: 1 addition & 1 deletion libcurl-http/responses.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP responses
# Responses

Every HTTP request includes an HTTP response. An HTTP response is a set of
metadata and a response body, where the body can occasionally be zero bytes
Expand Down
2 changes: 1 addition & 1 deletion libcurl-http/upload.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP upload
# Upload

Uploads over HTTP can be done in many different ways and it is important to
notice the differences. They can use different methods, like POST or PUT, and
Expand Down
2 changes: 1 addition & 1 deletion libcurl-http/versions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HTTP versions
# Versions

Like all Internet protocols, the HTTP protocol has kept evolving over the
years and now there are clients and servers distributed over the world and
Expand Down
2 changes: 1 addition & 1 deletion libcurl/--libcurl.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# curl --libcurl
# --libcurl

We actively encourage users to first try out the transfer they want to do with
the curl command-line tool, and once it works roughly the way you want it to,
Expand Down
2 changes: 1 addition & 1 deletion libcurl/callbacks/debug.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Debug callback
# Debug

The debug callback is set with `CURLOPT_DEBUGFUNCTION`:

Expand Down
2 changes: 1 addition & 1 deletion libcurl/callbacks/header.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Header callback
# Header data

The header callback is set with `CURLOPT_HEADERFUNCTION`:

Expand Down
2 changes: 1 addition & 1 deletion libcurl/callbacks/openclosesocket.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Opensocket and closesocket callbacks
# Opensocket and closesocket

Occasionally you end up in a situation where you want your application to
control with more precision exactly what socket libcurl will use for its
Expand Down
2 changes: 1 addition & 1 deletion libcurl/callbacks/progress.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Progress callback
# Progress information

The progress callback is what gets called regularly and repeatedly for each
transfer during the entire lifetime of the transfer. The old callback was set
Expand Down
2 changes: 1 addition & 1 deletion libcurl/callbacks/read.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Read callback
# Read data

The read callback is set with `CURLOPT_READFUNCTION`:

Expand Down
Loading

0 comments on commit dd62059

Please sign in to comment.