@@ -35,7 +35,8 @@ class TestURLSession : LoopbackServerTest {
3535 ( " test_verifyRequestHeaders " , test_verifyRequestHeaders) ,
3636 ( " test_verifyHttpAdditionalHeaders " , test_verifyHttpAdditionalHeaders) ,
3737 ( " test_timeoutInterval " , test_timeoutInterval) ,
38- ( " test_httpRedirection " , test_httpRedirection) ,
38+ ( " test_httpRedirectionWithCompleteRelativePath " , test_httpRedirectionWithCompleteRelativePath) ,
39+ //("test_httpRedirectionWithInCompleteRelativePath", test_httpRedirectionWithInCompleteRelativePath), /* temporarily disabled. Needs HTTPServer rework */
3940 //("test_httpRedirectionTimeout", test_httpRedirectionTimeout), /* temporarily disabled (https://bugs.swift.org/browse/SR-5751) */
4041 ( " test_http0_9SimpleResponses " , test_http0_9SimpleResponses) ,
4142 ( " test_outOfRangeButCorrectlyFormattedHTTPCode " , test_outOfRangeButCorrectlyFormattedHTTPCode) ,
@@ -325,14 +326,22 @@ class TestURLSession : LoopbackServerTest {
325326 waitForExpectations ( timeout: 30 )
326327 }
327328
328- func test_httpRedirection ( ) {
329+ func test_httpRedirectionWithCompleteRelativePath ( ) {
329330 let urlString = " http://127.0.0.1: \( TestURLSession . serverPort) /UnitedStates "
330331 let url = URL ( string: urlString) !
331332 let d = HTTPRedirectionDataTask ( with: expectation ( description: " GET \( urlString) : with HTTP redirection " ) )
332333 d. run ( with: url)
333334 waitForExpectations ( timeout: 12 )
334335 }
335336
337+ func test_httpRedirectionWithInCompleteRelativePath( ) {
338+ let urlString = " http://127.0.0.1: \( TestURLSession . serverPort) /UnitedKingdom "
339+ let url = URL ( string: urlString) !
340+ let d = HTTPRedirectionDataTask ( with: expectation ( description: " GET \( urlString) : with HTTP redirection " ) )
341+ d. run ( with: url)
342+ waitForExpectations ( timeout: 12 )
343+ }
344+
336345 /*
337346 // temporarily disabled (https://bugs.swift.org/browse/SR-5751)
338347 func test_httpRedirectionTimeout() {
0 commit comments