aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client/httpc_internal.hrl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-10-18 17:47:53 +0200
committerMicael Karlberg <[email protected]>2011-10-18 17:47:53 +0200
commitc30eb71556cd569fea82de2a1c2a5a17e71650c1 (patch)
tree80ea91aedcae12b65d0a51c41f638b38fbf6a69b /lib/inets/src/http_client/httpc_internal.hrl
parent45e501e1280839d91969e9d73449b9e474468e3e (diff)
downloadotp-c30eb71556cd569fea82de2a1c2a5a17e71650c1.tar.gz
otp-c30eb71556cd569fea82de2a1c2a5a17e71650c1.tar.bz2
otp-c30eb71556cd569fea82de2a1c2a5a17e71650c1.zip
[httpc] Wrong Host header in IPv6 HTTP requests.
When a URI with a IPv6 host is parsed, the brackets that encapsulates the nnn is removed. This value is then supplied as the host header. This can cause problems with some servers. A workaround for this is to use headers_as_is and provide the host header with the requst call To solve this a new option has been added, ipv6_host_with_brackets. This option specifies if the host value of the host header shall include the branckets or not. By default, it does not (as before). OTP-9628
Diffstat (limited to 'lib/inets/src/http_client/httpc_internal.hrl')
-rw-r--r--lib/inets/src/http_client/httpc_internal.hrl41
1 files changed, 22 insertions, 19 deletions
diff --git a/lib/inets/src/http_client/httpc_internal.hrl b/lib/inets/src/http_client/httpc_internal.hrl
index 1d8a5b6a92..e4127d992d 100644
--- a/lib/inets/src/http_client/httpc_internal.hrl
+++ b/lib/inets/src/http_client/httpc_internal.hrl
@@ -90,25 +90,28 @@
%%% All data associated to a specific HTTP request
-record(request,
{
- id, % ref() - Request Id
- from, % pid() - Caller
- redircount = 0,% Number of redirects made for this request
- scheme, % http | https
- address, % ({Host,Port}) Destination Host and Port
- path, % string() - Path of parsed URL
- pquery, % string() - Rest of parsed URL
- method, % atom() - HTTP request Method
- headers, % #http_request_h{}
- content, % {ContentType, Body} - Current HTTP request
- settings, % #http_options{} - User defined settings
- abs_uri, % string() ex: "http://www.erlang.org"
- userinfo, % string() - optinal "<userinfo>@<host>:<port>"
- stream, % Boolean() - stream async reply?
- headers_as_is, % Boolean() - workaround for servers that does
- % not honor the http standard, can also be used for testing purposes.
- started, % integer() > 0 - When we started processing the request
- timer, % undefined | ref()
- socket_opts % undefined | [socket_option()]
+ id, % ref() - Request Id
+ from, % pid() - Caller
+ redircount = 0,% Number of redirects made for this request
+ scheme, % http | https
+ address, % ({Host,Port}) Destination Host and Port
+ path, % string() - Path of parsed URL
+ pquery, % string() - Rest of parsed URL
+ method, % atom() - HTTP request Method
+ headers, % #http_request_h{}
+ content, % {ContentType, Body} - Current HTTP request
+ settings, % #http_options{} - User defined settings
+ abs_uri, % string() ex: "http://www.erlang.org"
+ userinfo, % string() - optinal "<userinfo>@<host>:<port>"
+ stream, % boolean() - stream async reply?
+ headers_as_is, % boolean() - workaround for servers that does
+ % not honor the http standard, can also be used
+ % for testing purposes.
+ started, % integer() > 0 - When we started processing the
+ % request
+ timer, % undefined | ref()
+ socket_opts, % undefined | [socket_option()]
+ ipv6_host_with_brackets % boolean()
}
).