-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
enhancementNew feature or requestNew feature or requestlow-priorityLow Priority fixes/improvementsLow Priority fixes/improvements
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.hheader file - For some reason we have code that handles all kinds of media/web files (?)
-(Surely, most of this is probably very unnecessary)blur/contrib/epee/include/net/http_protocol_handler.inl
Lines 663 to 688 in 8fa4725
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; } //-----------------------------------------------------------------------------------
Consider partial rewrite.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestlow-priorityLow Priority fixes/improvementsLow Priority fixes/improvements