Artifactspublic-v0

curl

master
ply4 git calls39 ms288 KiB3 cachedprotocol v2
69 lines2.9 KiBRaw

--header

Extra header to include in information sent. When used within an HTTP request, it is added to the regular request headers.

For an IMAP or SMTP MIME uploaded mail built with --form options, it is prepended to the resulting MIME document, effectively including it at the mail global level. It does not affect raw uploaded mails (Added in 7.56.0).

You may specify any number of extra headers. Note that if you should add a custom header that has the same name as one of the internal ones curl would use, your externally set header is used instead of the internal one. This allows you to make even trickier stuff than curl would normally do. You should not replace internally set headers without knowing perfectly well what you are doing. Remove an internal header by giving a replacement without content on the right side of the colon, as in: -H Host:. If you send the custom header with no-value then its header must be terminated with a semicolon, such as -H X-Custom-Header; to send X-Custom-Header:.

curl makes sure that each header you add/replace is sent with the proper end-of-line marker, you should thus not add that as a part of the header content: do not add newlines or carriage returns, they only mess things up for you. curl passes on the verbatim string you give it without any filter or other safe guards. That includes white space and control characters.

This option can take an argument in @filename style, which then adds a header for each line in the input file. Using @- makes curl read the header file from stdin. (Added in 7.55.0)

Please note that most anti-spam utilities check the presence and value of several MIME mail headers: these are From:, To:, Date: and Subject: among others and should be added with this option.

You need --proxy-header to send custom headers intended for an HTTP proxy. (Added in 7.37.0)

Passing on a Transfer-Encoding: chunked header when doing an HTTP request with a request body, makes curl send the data using chunked encoding.

WARNING: headers set with this option are set in all HTTP requests - even after redirects are followed, like when told with --location. This can lead to the header being sent to other hosts than the original host, so sensitive headers should be used with caution combined with following redirects.

Authorization: and Cookie: headers are explicitly not passed on in HTTP requests when following redirects to other origins, unless --location-trusted is used.

1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: header
5Short: H
6Arg: <header/@file>
7Help: Pass custom header(s) to server
8Protocols: HTTP IMAP SMTP
9Category: important http imap smtp
10Added: 5.0
11Multi: append
12See-also:
13 - user-agent
14 - referer
15 - proxy-header
16Example:
17 - -H "X-First-Name: Joe" $URL
18 - -H "User-Agent: yes-please/2000" $URL
19 - -H "Host:" $URL
20 - -H @headers.txt $URL
21---
23# `--header`
25Extra header to include in information sent. When used within an HTTP request,
26it is added to the regular request headers.
28For an IMAP or SMTP MIME uploaded mail built with --form options, it is
29prepended to the resulting MIME document, effectively including it at the mail
30global level. It does not affect raw uploaded mails (Added in 7.56.0).
32You may specify any number of extra headers. Note that if you should add a
33custom header that has the same name as one of the internal ones curl would
34use, your externally set header is used instead of the internal one. This
35allows you to make even trickier stuff than curl would normally do. You should
36not replace internally set headers without knowing perfectly well what you are
37doing. Remove an internal header by giving a replacement without content on
38the right side of the colon, as in: -H `Host:`. If you send the custom header
39with no-value then its header must be terminated with a semicolon, such as -H
40`X-Custom-Header;` to send `X-Custom-Header:`.
42curl makes sure that each header you add/replace is sent with the proper
43end-of-line marker, you should thus **not** add that as a part of the header
44content: do not add newlines or carriage returns, they only mess things up for
45you. curl passes on the verbatim string you give it without any filter or
46other safe guards. That includes white space and control characters.
48This option can take an argument in @filename style, which then adds a header
49for each line in the input file. Using @- makes curl read the header file from
50stdin. (Added in 7.55.0)
52Please note that most anti-spam utilities check the presence and value of
53several MIME mail headers: these are `From:`, `To:`, `Date:` and `Subject:`
54among others and should be added with this option.
56You need --proxy-header to send custom headers intended for an HTTP proxy.
57(Added in 7.37.0)
59Passing on a `Transfer-Encoding: chunked` header when doing an HTTP request
60with a request body, makes curl send the data using chunked encoding.
62**WARNING**: headers set with this option are set in all HTTP requests - even
63after redirects are followed, like when told with --location. This can lead to
64the header being sent to other hosts than the original host, so sensitive
65headers should be used with caution combined with following redirects.
67`Authorization:` and `Cookie:` headers are explicitly *not* passed on in HTTP
68requests when following redirects to other origins, unless --location-trusted
69is used.
Diagnostics4 git calls · 39 ms
CallStatusSizeTime039 ms
discover200152 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=3
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=34
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2001.5 KiB · hit34 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=1558
git.response.cache=HIT
git.response.duration_ms=34
git.fetch.wants=9e1f2029e08f8a1f138e77ae78f264517ac7d274
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=1558
git.pkt.payload.max=1537
git.sideband.band1.bytes=1536
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e1a7323a425e44
Request
672958e0…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format