@@ -35,7 +35,8 @@ class TestURLSession : LoopbackServerTest {
35
35
( " test_verifyRequestHeaders " , test_verifyRequestHeaders) ,
36
36
( " test_verifyHttpAdditionalHeaders " , test_verifyHttpAdditionalHeaders) ,
37
37
( " test_timeoutInterval " , test_timeoutInterval) ,
38
- ( " test_httpRedirection " , test_httpRedirection) ,
38
+ ( " test_httpRedirectionWithCompleteRelativePath " , test_httpRedirectionWithCompleteRelativePath) ,
39
+ //("test_httpRedirectionWithInCompleteRelativePath", test_httpRedirectionWithInCompleteRelativePath), /* temporarily disabled. Needs HTTPServer rework */
39
40
//("test_httpRedirectionTimeout", test_httpRedirectionTimeout), /* temporarily disabled (https://bugs.swift.org/browse/SR-5751) */
40
41
( " test_http0_9SimpleResponses " , test_http0_9SimpleResponses) ,
41
42
( " test_outOfRangeButCorrectlyFormattedHTTPCode " , test_outOfRangeButCorrectlyFormattedHTTPCode) ,
@@ -325,14 +326,22 @@ class TestURLSession : LoopbackServerTest {
325
326
waitForExpectations ( timeout: 30 )
326
327
}
327
328
328
- func test_httpRedirection ( ) {
329
+ func test_httpRedirectionWithCompleteRelativePath ( ) {
329
330
let urlString = " http://127.0.0.1: \( TestURLSession . serverPort) /UnitedStates "
330
331
let url = URL ( string: urlString) !
331
332
let d = HTTPRedirectionDataTask ( with: expectation ( description: " GET \( urlString) : with HTTP redirection " ) )
332
333
d. run ( with: url)
333
334
waitForExpectations ( timeout: 12 )
334
335
}
335
336
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
+
336
345
/*
337
346
// temporarily disabled (https://bugs.swift.org/browse/SR-5751)
338
347
func test_httpRedirectionTimeout() {
0 commit comments