Re: [Cppcms-users] async connections and response headers
Brought to you by:
artyom-beilis
From: Artyom <art...@ya...> - 2010-07-13 19:02:45
|
Hello, There had been some restructuring in the internal handling of requests and responses and looks like something is messed up. Looks like there are more then few bugs need to be fixed connected to all this. Hopefully tomorrow I'll be able to commit fixes and cleanup the mess, Meanwhile I'll recommend to stick with released beta version, which comes before numerous updates that messed many things up or wait a little. The code below and the previous code you send should work with released beta version and they fail in svn. I'll update you as soon as I fix this issues in the svn. Thanks for points you had bring up. Artyom ----- Original Message ---- > From: Frank Enderle <fra...@an...> > To: cpp...@li... > Sent: Tue, July 13, 2010 9:20:10 PM > Subject: [Cppcms-users] async connections and response headers > > hi, > > i have an async application: > > class Test : public cppcms::application { > public: > Test(cppcms::service &srv) > : cppcms::application(srv) { > dispatcher().assign("^/test", &Test::test, this); > } > > void main(std::string url) { > if(!dispatcher().dispatch(url)) { > response().status(404); > response().finalize(); > release_context()->async_complete_response(); > } > } > > void test() { > response().set_content_header("text/plain"); > response().out() << "test"; > response().finalize(); > release_context()->async_complete_response(); > } > }; > > int main(int argc, char *argv[]) { > try { > cppcms::service srv(argc, argv); > booster::intrusive_ptr<Test> app = new Test(srv); > srv.applications_pool().mount(app, cppcms::mount_point("test")); > srv.run(); > } catch(std::exception const &e) { > std::cerr << e.what() << std::endl; > } > } > > if i start the application using scgi behind nginx and i call > http://.../test/test i get the expected 'test' string in the browser, > but the application sends nothing else (i.e. no response headers) and > the nginx log emits the following: > > upstream sent neither valid HTTP/1.0 header nor "Status" header line > while reading response header from upstream > > whats wrong here? > > thanks, > > frank > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |