Files
aead
aes
aes_gcm
aes_soft
aho_corasick
atty
base64
bitflags
block_buffer
byteorder
cfg_if
chrono
format
naive
offset
sys
cipher
cookie
cpufeatures
cpuid_bool
crypto_mac
ctr
devise
devise_codegen
devise_core
diesel
associations
connection
expression
functions
ops
expression_methods
macros
migration
pg
connection
expression
extensions
query_builder
serialize
types
upsert
query_builder
delete_statement
insert_statement
nodes
select_statement
update_statement
query_dsl
query_source
sql_types
type_impls
types
diesel_derives
digest
dotenv
filetime
generic_array
getrandom
ghash
glob
hashbrown
hkdf
hmac
httparse
hyper
client
header
common
accept.rsaccept_charset.rsaccept_encoding.rsaccept_language.rsaccept_ranges.rsaccess_control_allow_credentials.rsaccess_control_allow_headers.rsaccess_control_allow_methods.rsaccess_control_allow_origin.rsaccess_control_expose_headers.rsaccess_control_max_age.rsaccess_control_request_headers.rsaccess_control_request_method.rsallow.rsauthorization.rscache_control.rsconnection.rscontent_disposition.rscontent_encoding.rscontent_language.rscontent_length.rscontent_range.rscontent_type.rscookie.rsdate.rsetag.rsexpect.rsexpires.rsfrom.rshost.rsif_match.rsif_modified_since.rsif_none_match.rsif_range.rsif_unmodified_since.rslast_modified.rslink.rslocation.rsmod.rsorigin.rspragma.rsprefer.rspreference_applied.rsrange.rsreferer.rsreferrer_policy.rsserver.rsset_cookie.rsstrict_transport_security.rstransfer_encoding.rsupgrade.rsuser_agent.rsvary.rs
internals
shared
http
server
idna
indexmap
inotify
inotify_sys
instant
iovec
itoa
language_tags
lazy_static
lazycell
libc
unix
limiting_factor
lock_api
log
matches
memchr
memchr
memmem
mime
mio
deprecated
net
sys
mio_extras
net2
notify
num_cpus
num_integer
num_traits
opaque_debug
parking_lot
parking_lot_core
pear
pear_codegen
percent_encoding
polyval
ppv_lite86
pq_sys
r2d2
rand
distributions
rngs
seq
rand_chacha
rand_core
regex
literal
regex_syntax
ast
hir
unicode_tables
rocket
config
data
fairing
local
request
response
router
rocket_codegen
attribute
bang
derive
rocket_contrib
rocket_http
parse
uri
ryu
same_file
scheduled_thread_pool
scopeguard
serde
de
private
ser
serde_json
sha2
slab
smallvec
state
subtle
thread_local
time
tinyvec
tinyvec_macros
toml
traitobject
typeable
typenum
ucd_util
unicase
unicode_bidi
unicode_normalization
unicode_xid
universal_hash
url
utf8_ranges
walkdir
yansi
>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
header! {
/// `Location` header, defined in
/// [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.1.2)
///
/// The `Location` header field is used in some responses to refer to a
/// specific resource in relation to the response. The type of
/// relationship is defined by the combination of request method and
/// status code semantics.
///
/// # ABNF
/// ```plain
/// Location = URI-reference
/// ```
///
/// # Example values
/// * `/People.html#tim`
/// * `http://www.example.net/index.html`
///
/// # Examples
/// ```
/// use hyper::header::{Headers, Location};
///
/// let mut headers = Headers::new();
/// headers.set(Location("/People.html#tim".to_owned()));
/// ```
/// ```
/// use hyper::header::{Headers, Location};
///
/// let mut headers = Headers::new();
/// headers.set(Location("http://www.example.com/index.html".to_owned()));
/// ```
// TODO: Use URL
(Location, "Location") => [String]
test_location {
// Testcase from RFC
test_header!(test1, vec![b"/People.html#tim"]);
test_header!(test2, vec![b"http://www.example.net/index.html"]);
}
}
bench_header!(bench, Location, { vec![b"http://foo.com/hello:3000".to_vec()] });