Git Product home page Git Product logo

cinatra's People

Contributors

chenfengyuan avatar junjiexing avatar losywee avatar lucklove avatar purecpp avatar qicosmos avatar sarrow104 avatar shines77 avatar tornodo avatar void001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cinatra's Issues

compile error

compile error on g++ (Ubuntu 5.1.0-0ubuntu11~14.04.1) 5.1.0
cd /home/phonzia/cinatra/build/examples/cinatra && g++ -I/home/phonzia/cinatra/examples/cinatra/../../include -std=c++1y -Wall -Wextra -o CMakeFiles/cinatra.dir/main.cpp.o -c /home/phonzia/cinatra/examples/cinatra/main.cpp
In file included from /home/phonzia/cinatra/examples/hello_world/main.cpp:1:0:
/home/phonzia/cinatra/examples/hello_world/../../include/cinatra/cinatra.hpp: In member function ‘T& cinatra::Cinatra::get_middleware()’:
/home/phonzia/cinatra/examples/hello_world/../../include/cinatra/cinatra.hpp:107:28: error: expected primary-expression before ‘>’ token
return aop_.get_aspect();
^
/home/phonzia/cinatra/examples/hello_world/../../include/cinatra/cinatra.hpp:107:30: error: expected primary-expression before ‘)’ token
return aop_.get_aspect();
^
In file included from /home/phonzia/cinatra/examples/cinatra/main.cpp:8:0:
/home/phonzia/cinatra/examples/cinatra/../../include/cinatra/cinatra.hpp: In member function ‘T& cinatra::Cinatra::get_middleware()’:
/home/phonzia/cinatra/examples/cinatra/../../include/cinatra/cinatra.hpp:107:28: error: expected primary-expression before ‘>’ token
return aop_.get_aspect();
^
/home/phonzia/cinatra/examples/cinatra/../../include/cinatra/cinatra.hpp:107:30: error: expected primary-expression before ‘)’ token
return aop_.get_aspect();

为什么CINATRA_SINGLE_THREAD没定义的时候,num_threads = 1?

ifndef CINATRA_SINGLE_THREAD

    int num_threads_ = 1;

else

    int num_threads_ = std::thread::hardware_concurrency();

endif // CINATRA_SINGLE_THREAD

不知道是否我理解错误了,如果CINATRA_SINGLE_THREAD没定义,不是应该是多线程吗?为什么这里却说#ifndef CINATRA_SINGLE_THREAD, num_threads = 1?

issue in cinatra.hpp

There was an issue in cinatra.hpp
void run()
{
HTTPServer s(num_threads_);
....
...
}

need fixed as below:
void run()
{

ifndef CINATRA_SINGLE_THREAD

HTTPServer s(num_threads_);

else

HTTPServer s;

endif

     ....

}

Compile error on Mac OSX

Any help?

[ 96%] Built target cinatra_test
2 warnings generated.
[100%] Linking CXX executable cinatra
cd /Users/mic/vm/ui/cinatra/build/examples/cinatra && /usr/local/Cellar/cmake/3.3.0/bin/cmake -E cmake_link_script CMakeFiles/cinatra.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++    -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/cinatra.dir/main.cpp.o  -o cinatra  /usr/local/lib/libboost_coroutine-mt.dylib /usr/local/lib/libboost_context-mt.dylib /usr/local/lib/libboost_system-mt.dylib /usr/local/lib/libboost_thread-mt.dylib /usr/local/lib/libboost_chrono-mt.dylib /usr/local/lib/libboost_date_time-mt.dylib /usr/local/lib/libboost_regex-mt.dylib /usr/local/lib/libboost_filesystem-mt.dylib /usr/local/lib/libboost_unit_test_framework-mt.dylib /usr/lib/libssl.dylib /usr/lib/libcrypto.dylib -lpthread 
Undefined symbols for architecture x86_64:
  "_ERR_remove_thread_state", referenced from:
      boost::asio::ssl::detail::openssl_init_base::do_init::~do_init() in main.cpp.o
  "_TLSv1_1_client_method", referenced from:
      boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in main.cpp.o
  "_TLSv1_1_method", referenced from:
      boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in main.cpp.o
  "_TLSv1_1_server_method", referenced from:
      boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in main.cpp.o
  "_TLSv1_2_client_method", referenced from:
      boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in main.cpp.o
  "_TLSv1_2_method", referenced from:
      boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in main.cpp.o
  "_TLSv1_2_server_method", referenced from:
      boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [examples/cinatra/cinatra] Error 1
make[1]: *** [examples/cinatra/CMakeFiles/cinatra.dir/all] Error 2
make: *** [all] Error 2

错误使用strcpy_s

multipart_parser* multipart_parser_init
(const char boundary, const multipart_parser_settings settings) {

size_t boundary_length = strlen(boundary);
multipart_parser* p = malloc(sizeof(multipart_parser) +
boundary_length +
boundary_length + 9);

strcpy_s(p->multipart_boundary, boundary_length, boundary);

boundary_length 这个参数给得有问题,应该是boundary_length + 1

Chinese commit messages

Hey,

it would be nice if you guys could do english commit messages instead of chinese, because I cannot understand them.

(English comments in source code would be nice too.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.