Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/http/http.cpp
Show First 20 Lines • Show All 1369 Lines • ▼ Show 20 Line(s) | 1353 | { | |||
---|---|---|---|---|---|
1370 | 1370 | | |||
1371 | proceedUntilResponseHeader(); | 1371 | proceedUntilResponseHeader(); | ||
1372 | 1372 | | |||
1373 | // Work around strict Apache-2 WebDAV implementation which refuses to cooperate | 1373 | // Work around strict Apache-2 WebDAV implementation which refuses to cooperate | ||
1374 | // with webdav://host/directory, instead requiring webdav://host/directory/ | 1374 | // with webdav://host/directory, instead requiring webdav://host/directory/ | ||
1375 | // (strangely enough it accepts Destination: without a trailing slash) | 1375 | // (strangely enough it accepts Destination: without a trailing slash) | ||
1376 | // See BR# 209508 and BR#187970 | 1376 | // See BR# 209508 and BR#187970 | ||
1377 | if (m_request.responseCode == 301) { | 1377 | if (m_request.responseCode == 301) { | ||
1378 | m_request.url = m_request.redirectUrl; | 1378 | QUrl redir = m_request.redirectUrl; | ||
1379 | | ||||
1380 | resetSessionSettings(); | ||||
1381 | | ||||
1382 | m_request.url = redir; | ||||
1379 | m_request.method = DAV_MOVE; | 1383 | m_request.method = DAV_MOVE; | ||
1380 | m_request.davData.desturl = newDest.toString(); | 1384 | m_request.davData.desturl = newDest.toString(); | ||
1381 | m_request.davData.overwrite = (flags & KIO::Overwrite); | 1385 | m_request.davData.overwrite = (flags & KIO::Overwrite); | ||
1382 | m_request.url.setQuery(QString()); | 1386 | m_request.url.setQuery(QString()); | ||
1383 | m_request.cacheTag.policy = CC_Reload; | 1387 | m_request.cacheTag.policy = CC_Reload; | ||
1384 | // force re-authentication... | 1388 | | ||
1385 | delete m_wwwAuth; | | |||
1386 | m_wwwAuth = nullptr; | | |||
1387 | proceedUntilResponseHeader(); | 1389 | proceedUntilResponseHeader(); | ||
1388 | } | 1390 | } | ||
1389 | 1391 | | |||
1390 | if (m_request.responseCode == 201) { | 1392 | if (m_request.responseCode == 201) { | ||
1391 | davFinished(); | 1393 | davFinished(); | ||
1392 | } else { | 1394 | } else { | ||
1393 | davError(); | 1395 | davError(); | ||
1394 | } | 1396 | } | ||
▲ Show 20 Lines • Show All 4232 Lines • Show Last 20 Lines |