Skip to content

Enhancement: rewrite of epee library (partial, at least)  #51

Open
@who-biz

Description

Not liking the things in that library. Historically, its been a source of a fairly large problem at least once (Cisco Talos). Comments in code don't seem to be happy with it either... which draws similar attention to p2p.

  • IP addressess handled irresponsibly...
  • Removed a gif-content-type from the http_base.h header file
  • For some reason we have code that handles all kinds of media/web files (?)
    -
    template<class t_connection_context>
    std::string simple_http_connection_handler<t_connection_context>::get_file_mime_tipe(const std::string& path)
    {
    std::string result;
    std::string ext = string_tools::get_extension(path);
    if(!string_tools::compare_no_case(ext, "gif"))
    result = "image/gif";
    else if(!string_tools::compare_no_case(ext, "jpg"))
    result = "image/jpeg";
    else if(!string_tools::compare_no_case(ext, "html"))
    result = "text/html";
    else if(!string_tools::compare_no_case(ext, "htm"))
    result = "text/html";
    else if(!string_tools::compare_no_case(ext, "js"))
    result = "application/x-javascript";
    else if(!string_tools::compare_no_case(ext, "css"))
    result = "text/css";
    else if(!string_tools::compare_no_case(ext, "xml"))
    result = "application/xml";
    else if(!string_tools::compare_no_case(ext, "svg"))
    result = "image/svg+xml";
    return result;
    }
    //-----------------------------------------------------------------------------------
    (Surely, most of this is probably very unnecessary)

Consider partial rewrite.

Metadata

Assignees

Labels

enhancementNew feature or requestlow-priorityLow Priority fixes/improvements

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions