File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change
1
+ Add brackets in `Host` header of http request when relevant.
2
+ See: https://github.com/mirage/ocaml-cohttp/issues/997
3
+
4
+ diff --git i/ocaml/xapi/xapi_vm.ml w/ocaml/xapi/xapi_vm.ml
5
+ index 4db86acbd..e310f5549 100644
6
+ --- i/ocaml/xapi/xapi_vm.ml
7
+ +++ w/ocaml/xapi/xapi_vm.ml
8
+ @@ -1518,7 +1518,17 @@ let rec import_inner n ~__context ~url ~sr ~full_restore ~force =
9
+ Cohttp.Request.Make (Cohttp_posix_io.Unbuffered_IO) in
10
+ let module Response =
11
+ Cohttp.Response.Make (Cohttp_posix_io.Unbuffered_IO) in
12
+ - let request = Cohttp.Request.make ~meth:`GET uri in
13
+ + let headers = Cohttp.Header.init () in
14
+ + let headers =
15
+ + Cohttp.Header.add_unless_exists headers "host"
16
+ + (match Uri.scheme uri with
17
+ + | Some "httpunix" -> ""
18
+ + | _ -> (
19
+ + (Http.Url.maybe_wrap_IPv6_literal (Uri.host_with_default ~default:"localhost" uri))
20
+ + ^
21
+ + match Uri.port uri with Some p -> ":" ^ string_of_int p | None -> ""))
22
+ + in
23
+ + let request = Cohttp.Request.make ~meth:`GET ?headers:(Some headers) uri in
24
+ let ic =
25
+ {
26
+ Cohttp_posix_io.Unbuffered_IO.header_buffer= None
Original file line number Diff line number Diff line change 18
18
Summary: xapi - xen toolstack for XCP
19
19
Name: xapi
20
20
Version: 23.31.0
21
- Release: 1.1 %{?xsrel }%{?dist }
21
+ Release: 1.2 %{?xsrel }%{?dist }
22
22
Group: System/Hypervisor
23
23
License: LGPL-2.1 -or-later WITH OCaml-LGPL-linking-exception
24
24
URL: http://www.xen.org
@@ -61,6 +61,7 @@ Patch1003: xapi-23.24.0-update-db-tunnel-protocol-from-other_config.XCP-ng.patch
61
61
# Needed for IPv6 support. Upstream wants a better fix. Drop when upstream fixed it.
62
62
Patch1004: xapi-23.3.0-filter-link-local -address-ipv6.XCP-ng.patch
63
63
Patch1005: xapi-23.31.0-extend-uefi-cert-api.patch
64
+ Patch1006: xapi-23.31.0-fix-ipv6-import.XCP-ng.patch
64
65
65
66
%{?_cov_buildrequires }
66
67
BuildRequires: ocaml-ocamldoc
@@ -1340,6 +1341,9 @@ Coverage files from unit tests
1340
1341
%{?_cov_results_package }
1341
1342
1342
1343
%changelog
1344
+ * Thu Feb 08 2024 Benjamin Reis <benjamin.reis@vates.tech> - 23.31.0-1.2
1345
+ - Add xapi-23.31.0-fix-ipv6-import.XCP-ng.patch
1346
+
1343
1347
* Mon Jan 22 2024 Samuel Verschelde <stormi-xcp@ylix.fr> - 23.31.0-1.1
1344
1348
- Rebase on 23.31.0-1
1345
1349
- Rediff patches (Benjamin Reis)
You can’t perform that action at this time.
0 commit comments