equal
deleted
inserted
replaced
27 #include "ResourceHandleManagerSymbian.h" |
27 #include "ResourceHandleManagerSymbian.h" |
28 #include "StaticObjectsContainer.h" |
28 #include "StaticObjectsContainer.h" |
29 #include "ResourceLoaderDelegate.h" |
29 #include "ResourceLoaderDelegate.h" |
30 #include "HttpCacheSupply.h" |
30 #include "HttpCacheSupply.h" |
31 #include "HttpPostDataSupplier.h" |
31 #include "HttpPostDataSupplier.h" |
32 #include <httpfiltercommonstringsext.h> |
32 #include <HttpFilterCommonStringsExt.h> |
33 #include <brctldefs.h> |
33 #include <BrCtlDefs.h> |
34 #include "BrCtl.h" |
34 #include "BrCtl.h" |
35 #include <brctlspecialloadobserver.h> |
35 #include "BrCtlSpecialLoadObserver.h" |
36 #include "Frame.h" |
36 #include "Frame.h" |
37 #include "FrameLoader.h" |
37 #include "FrameLoader.h" |
38 #include "DocumentLoader.h" |
38 #include "DocumentLoader.h" |
39 #include "HttpUiCallbacks.h" |
39 #include "HttpUiCallbacks.h" |
40 #include "HttpRequestHeaderManager.h" |
40 #include "HttpRequestHeaderManager.h" |
646 if (!m_transaction) { |
646 if (!m_transaction) { |
647 // this object might be invalid at this point. |
647 // this object might be invalid at this point. |
648 return; |
648 return; |
649 } |
649 } |
650 int statusCode = m_transaction->Response().StatusCode(); |
650 int statusCode = m_transaction->Response().StatusCode(); |
651 if ((statusCode == 404) && (aEvent.iStatus == THTTPEvent::EFailed) && (m_accumulatedSize != 0)) { |
651 if ( statusCode != 200) { |
652 complete(KErrNone); |
|
653 } |
|
654 else if ( statusCode != 200) { |
|
655 complete(-25000 - m_transaction->Response().StatusCode()); |
652 complete(-25000 - m_transaction->Response().StatusCode()); |
656 } |
653 } |
657 else if (statusCode == 200 && aEvent.iStatus == THTTPEvent::EFailed) { |
654 else if (statusCode == 200 && aEvent.iStatus == THTTPEvent::EFailed) { |
658 // this is a weird combination, it is caused by cached supplier when a response only has the |
655 // this is a weird combination, it is caused by cached supplier when a response only has the |
659 // response header, but no response body is sent by the HTTP stack. It is a legitimate senario though. |
656 // response header, but no response body is sent by the HTTP stack. It is a legitimate senario though. |
914 { |
911 { |
915 __ASSERT_DEBUG( EFalse, THttpConnUtils::PanicLoader( KErrArgument ) ); |
912 __ASSERT_DEBUG( EFalse, THttpConnUtils::PanicLoader( KErrArgument ) ); |
916 break; |
913 break; |
917 } |
914 } |
918 } |
915 } |
919 m_isDone = ETrue; |
916 |
920 TRAP( ret, SendAuthRequestL( usernameVal, realmVal, isProxy, stale, passwordVal ) ); |
917 TRAP( ret, SendAuthRequestL( usernameVal, realmVal, isProxy, stale, passwordVal ) ); |
921 if (realmClose) |
918 if (realmClose) |
922 { |
919 { |
923 realmVal.Str().Close(); |
920 realmVal.Str().Close(); |
924 } |
921 } |
1032 // Execution is back from the dialog, move the transaction |
1029 // Execution is back from the dialog, move the transaction |
1033 // from the authentication listback into active list |
1030 // from the authentication listback into active list |
1034 HttpSessionManager* httpSessionMgr = StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager(); |
1031 HttpSessionManager* httpSessionMgr = StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager(); |
1035 httpSessionMgr->removeAuthRequest(this); |
1032 httpSessionMgr->removeAuthRequest(this); |
1036 httpSessionMgr->addRequest(this, m_handle); |
1033 httpSessionMgr->addRequest(this, m_handle); |
1037 m_isDone = EFalse; |
1034 |
1038 switch (aError) |
1035 switch (aError) |
1039 { |
1036 { |
1040 case KErrNone: |
1037 case KErrNone: |
1041 { |
1038 { |
1042 TRAP( ret, this->AddAuthenticationPropertiesL( aUsername, aPassword, aProxy) ); |
1039 TRAP( ret, this->AddAuthenticationPropertiesL( aUsername, aPassword, aProxy) ); |