Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
2104-inets-Remove-obsolete-code-from-httpd_serv...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2104-inets-Remove-obsolete-code-from-httpd_serve_SUITE.patch of Package erlang
From 4f2a76245603da745b599d32cda722a2a774d99f Mon Sep 17 00:00:00 2001 From: Johannes Christ <jc@jchri.st> Date: Thu, 23 Nov 2023 11:37:30 +0100 Subject: [PATCH] inets: Remove obsolete code from httpd_serve_SUITE The bug requiring this workaround was fixed by fc63402c4448fada630ee77ee3577115319487eb and b813bc0b09b44d9b5ada70f153904c435c4b4aa1. --- lib/inets/test/httpd_serve_SUITE.erl | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/inets/test/httpd_serve_SUITE.erl b/lib/inets/test/httpd_serve_SUITE.erl index 0469498a54..b3abaee057 100644 --- a/lib/inets/test/httpd_serve_SUITE.erl +++ b/lib/inets/test/httpd_serve_SUITE.erl @@ -120,24 +120,10 @@ maybe_convert_to_localhost(Ip) -> verify_200_at(Url) -> HttpcOpts = [{socket_opts, [{ipfamily, inet6fb4}]}], Request = {Url, []}, - Response = httpc:request(get, Request, [{autoredirect, false}], HttpcOpts), + Response = httpc:request(get, Request, [], HttpcOpts), case Response of {ok, {{_Version, 200, _}, _Headers, _Body}} -> Response; - {ok, {{_Version, 301, _}, Headers, _Body}} -> - % To be resilient against the case where the server is not - % reachable under its `server_name`, for instance, in test - % containers or other hosts with unexpected networking setups, - % replace the suggested hostname with the hostname we came from. - {_, SuggestedTarget} = proplists:lookup("location", Headers), - #{path := SuggestedPath} = uri_string:parse(SuggestedTarget), - OurUri = uri_string:parse(Url), - DecomposedTarget = maps:put(path, SuggestedPath, OurUri), - RedirectTarget = uri_string:recompose(DecomposedTarget), - RedirectedRequest = {RedirectTarget, []}, - RedirectedResponse = httpc:request(get, RedirectedRequest, [], HttpcOpts), - ct:log("Following redirect (rewritten from ~s to ~s)", [SuggestedTarget, RedirectTarget]), - {ok, {{_, 200, _}, _, _}} = RedirectedResponse; {error, {failed_connect, [{to_address, {"::", _Port}}, {inet6, [inet6], eaddrnotavail}, {inet, [inet], nxdomain}]}} -> -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor