1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
18 #include <inetprottextutils.h> |
18 #include <inetprottextutils.h> |
19 #include <httpstringconstants.h> |
19 #include <httpstringconstants.h> |
20 #include <http/rhttpheaders.h> |
20 #include <http/rhttpheaders.h> |
21 #include <http/framework/mrxdataobserver.h> |
21 #include <http/framework/mrxdataobserver.h> |
22 #include <httperr.h> |
22 #include <httperr.h> |
|
23 #include <e32math.h> |
23 |
24 |
24 #include "chttpclienttransaction.h" |
25 #include "chttpclienttransaction.h" |
25 #include "chttpconnectionmanager.h" |
26 #include "chttpconnectionmanager.h" |
26 #include "chttprequestcomposer.h" |
27 #include "chttprequestcomposer.h" |
27 #include "mhttpresponseobserver.h" |
28 #include "mhttpresponseobserver.h" |
495 __FLOG_0(_T8("Pipelining is disabled for WebLogic Server- \n")); |
496 __FLOG_0(_T8("Pipelining is disabled for WebLogic Server- \n")); |
496 #endif |
497 #endif |
497 manager->AppendPipelineFailedHost(hostVal.StrF().DesC()); |
498 manager->AppendPipelineFailedHost(hostVal.StrF().DesC()); |
498 } |
499 } |
499 } |
500 } |
|
501 |
|
502 if (name.DesC().CompareF(stringPool.StringF(HTTP::EWWWAuthenticate,RHTTPSession::GetTable()).DesC()) == KErrNone) |
|
503 { |
|
504 _LIT8(KNtlmProtocolName,"NTLM"); |
|
505 if (aFieldValue.FindF(KNtlmProtocolName)!= KErrNotFound) |
|
506 { |
|
507 CHttpClientTransaction& protTran = static_cast<CHttpClientTransaction&>(*iProtTrans); |
|
508 CHttpConnectionManager* manager = protTran.ConnectionManager(); |
|
509 _LIT8( KNtlmConnId, "NTLMConnId" ); |
|
510 if (aFieldValue.Length() >= 4 ) |
|
511 { |
|
512 if (manager->GetNtlmConnId() == KErrNotFound) |
|
513 { |
|
514 TInt ntmlConnId= Math::Random()%5789; //some magic number to get random connection id |
|
515 manager->SetNtlmConnId(ntmlConnId); |
|
516 RStringF ntlmId= stringPool.OpenFStringL( KNtlmConnId ); |
|
517 CleanupClosePushL(ntlmId); |
|
518 THTTPHdrVal value; |
|
519 value.SetInt( ntmlConnId ); |
|
520 trans.PropertySet().SetPropertyL( ntlmId, value ); |
|
521 CleanupStack::PopAndDestroy(&ntlmId); |
|
522 } |
|
523 else |
|
524 { |
|
525 RStringF ntlmId= stringPool.OpenFStringL( KNtlmConnId ); |
|
526 CleanupClosePushL(ntlmId); |
|
527 THTTPHdrVal value; |
|
528 value.SetInt(manager->GetNtlmConnId()); |
|
529 trans.PropertySet().SetPropertyL( ntlmId, value ); |
|
530 CleanupStack::PopAndDestroy(&ntlmId); |
|
531 } |
|
532 } |
|
533 } |
|
534 } |
500 |
535 |
501 CleanupStack::PopAndDestroy(&name); |
536 CleanupStack::PopAndDestroy(&name); |
502 |
537 |
503 if( BodyComplete() && !GotTrailers() ) |
538 if( BodyComplete() && !GotTrailers() ) |
504 { |
539 { |