[webkit-dev] Why is HTTPHeaderMap a map instead of multi-map?

Paul Pedriana ppedriana at gmail.com
Sat Feb 14 11:41:49 PST 2009


Given that HTTP header fields can have the same header represented more 
than once, why is it that HTTPHeaderMap is a map and not a multi-map? 
How would you send a ResourceRequest that has two headers of the same 
name to an HTTP server? Am I missing something?


namespace WebCore {

    typedef Vector<std::pair<String, String> > CrossThreadHTTPHeaderMapData;

    class HTTPHeaderMap : public HashMap<AtomicString, String, 
CaseFoldingHash> {
    public:
        // Gets a copy of the data suitable for passing to another thread.
        std::auto_ptr<CrossThreadHTTPHeaderMapData> copyData() const;

        void adopt(std::auto_ptr<CrossThreadHTTPHeaderMapData>);
    };

} // namespace WebCore





More information about the webkit-dev mailing list