webengine/osswebengine/WebKit/s60/plugins/PluginStreamLoaderClient.cpp
branchRCL_3
changeset 47 e1bea15f9a39
parent 28 d39add9822e2
child 48 79859ed3eea9
equal deleted inserted replaced
46:30342f40acbf 47:e1bea15f9a39
   165     int status = response.httpStatusCode();
   165     int status = response.httpStatusCode();
   166     if (status < 200 || status >= 300) {          
   166     if (status < 200 || status >= 300) {          
   167         cancelWithError(ResourceError(String(response.url()), KErrGeneral, String(response.url()), String(response.httpStatusText())));        
   167         cancelWithError(ResourceError(String(response.url()), KErrGeneral, String(response.url()), String(response.httpStatusText())));        
   168         return;
   168         return;
   169     }
   169     }
   170         
   170     
       
   171     // Currently we fill only response encoding type in the header field of NPStream structure, as url,MimeType and content-Length
       
   172     // are already a part of NPStream Structure
       
   173     
       
   174     HBufC8* headerPtr = HBufC8::NewLC(response.textEncodingName().length() + 1);
       
   175     headerPtr->Des().Copy(response.textEncodingName().des());
       
   176     headerPtr->Des().Append('\0');
       
   177     const char* headers = (const char*)headerPtr->Ptr();
       
   178     
   171     if (m_pluginstream) {
   179     if (m_pluginstream) {
   172         TRAP(m_error, m_pluginstream->createNPStreamL(response.url().des(), response.mimeType().des(), response.expectedContentLength()));
   180         TRAP(m_error, m_pluginstream->createNPStreamL(response.url().des(), response.mimeType().des(), response.expectedContentLength(), headers));
   173     }
   181     }
   174         
   182     
       
   183     CleanupStack::PopAndDestroy(headerPtr);
   175 }
   184 }
   176 
   185 
   177 void NetscapePlugInStreamLoaderClient::didReceiveData(const char* data, int length, long long lengthReceived)
   186 void NetscapePlugInStreamLoaderClient::didReceiveData(const char* data, int length, long long lengthReceived)
   178 {    
   187 {    
   179 
   188