< Previous by Date | Date Index | Next by Date > |
Thread Index |
Hi, If an undefined content type is parsed by SipMessage.cxx, the OctetsContents is used. If the same undefined content in MultiMixedContents is parsed by Content.cxx, the GenericContents (PlainContents) is used. I think it is a bug. Here are the two file source code: file SipMessage.cxx: Contents* SipMessage::getContents() const { if ( ContentsFactoryBase::getFactoryMap().find(header(h_ContentType)) == C ontentsFactoryBase::getFactoryMap().end() ) { InfoLog(<< "SipMessage::getContents: got content type (" << header(h_ContentType).type() << "/" << header(h_ContentType).subType() << ") that is not known, " << "returning as opaque application/octet-stream"); mContents = ContentsFactoryBase::getFactoryMap()[OctetContents::getStat icType()]->create(mContentsHfv, OctetContents::getStaticType()); } else { mContents = ContentsFactoryBase::getFactoryMap()[header(h_ContentType)] ->create(mContentsHfv, header(h_ContentType)); } } file Contents* c; Contents* Contents::createContents(const Mime& contentType, const Data& contents) { if (ContentsFactoryBase::getFactoryMap().find(contentType) != ContentsFactory Base::getFactoryMap().end()) { c = ContentsFactoryBase::getFactoryMap()[contentType]->create(hfv, content Type); } else { c = new GenericContents(hfv, contentType); } } -- Thanks Frank Yuan |