@@ -36,8 +36,8 @@ class TestURLSession : LoopbackServerTest {
3636 ( " test_verifyHttpAdditionalHeaders " , test_verifyHttpAdditionalHeaders) ,
3737 ( " test_timeoutInterval " , test_timeoutInterval) ,
3838 ( " test_httpRedirectionWithCompleteRelativePath " , test_httpRedirectionWithCompleteRelativePath) ,
39- ( " test_httpRedirectionWithInCompleteRelativePath " , test_httpRedirectionWithInCompleteRelativePath) , /* temporarily disabled. Needs HTTPServer rework */
40- ( " test_httpRedirectionTimeout " , test_httpRedirectionTimeout) , /* temporarily disabled (https://bugs.swift.org/browse/SR-5751) */
39+ ( " test_httpRedirectionWithInCompleteRelativePath " , test_httpRedirectionWithInCompleteRelativePath) ,
40+ ( " test_httpRedirectionTimeout " , test_httpRedirectionTimeout) ,
4141 ( " test_http0_9SimpleResponses " , test_http0_9SimpleResponses) ,
4242 ( " test_outOfRangeButCorrectlyFormattedHTTPCode " , test_outOfRangeButCorrectlyFormattedHTTPCode) ,
4343 ( " test_missingContentLengthButStillABody " , test_missingContentLengthButStillABody) ,
@@ -234,10 +234,11 @@ class TestURLSession : LoopbackServerTest {
234234 XCTFail ( " Intermittent failures on Android " )
235235#else
236236 let urlString = " http://127.0.0.1: \( TestURLSession . serverPort) /Peru "
237- let url = URL ( string: urlString) !
237+ var urlRequest = URLRequest ( url: URL ( string: urlString) !)
238+ urlRequest. setValue ( " 2.0 " , forHTTPHeaderField: " X-Pause " )
238239 let d = DataTask ( with: expectation ( description: " GET \( urlString) : task cancelation " ) )
239240 d. cancelExpectation = expectation ( description: " GET \( urlString) : task canceled " )
240- d. run ( with: url )
241+ d. run ( with: urlRequest )
241242 d. cancel ( )
242243 waitForExpectations ( timeout: 12 )
243244#endif
0 commit comments