@@ -28,8 +28,8 @@ class TestURLSession : LoopbackServerTest {
2828 ( " test_verifyHttpAdditionalHeaders " , test_verifyHttpAdditionalHeaders) ,
2929 ( " test_timeoutInterval " , test_timeoutInterval) ,
3030 ( " test_httpRedirectionWithCompleteRelativePath " , test_httpRedirectionWithCompleteRelativePath) ,
31- ( " test_httpRedirectionWithInCompleteRelativePath " , test_httpRedirectionWithInCompleteRelativePath) , /* temporarily disabled. Needs HTTPServer rework */
32- ( " test_httpRedirectionTimeout " , test_httpRedirectionTimeout) , /* temporarily disabled (https://bugs.swift.org/browse/SR-5751) */
31+ ( " test_httpRedirectionWithInCompleteRelativePath " , test_httpRedirectionWithInCompleteRelativePath) ,
32+ ( " test_httpRedirectionTimeout " , test_httpRedirectionTimeout) ,
3333 ( " test_http0_9SimpleResponses " , test_http0_9SimpleResponses) ,
3434 ( " test_outOfRangeButCorrectlyFormattedHTTPCode " , test_outOfRangeButCorrectlyFormattedHTTPCode) ,
3535 ( " test_missingContentLengthButStillABody " , test_missingContentLengthButStillABody) ,
@@ -226,10 +226,11 @@ class TestURLSession : LoopbackServerTest {
226226 XCTFail ( " Intermittent failures on Android " )
227227#else
228228 let urlString = " http://127.0.0.1: \( TestURLSession . serverPort) /Peru "
229- let url = URL ( string: urlString) !
229+ var urlRequest = URLRequest ( url: URL ( string: urlString) !)
230+ urlRequest. setValue ( " 2.0 " , forHTTPHeaderField: " X-Pause " )
230231 let d = DataTask ( with: expectation ( description: " GET \( urlString) : task cancelation " ) )
231232 d. cancelExpectation = expectation ( description: " GET \( urlString) : task canceled " )
232- d. run ( with: url )
233+ d. run ( with: urlRequest )
233234 d. cancel ( )
234235 waitForExpectations ( timeout: 12 )
235236#endif
0 commit comments