Hi, fine, that you found the regex code already. I haven't come to it to answer your previous patch. If you look at it, it is quite different from your suggested patch. The reason is, that I try to keep cxxtools compatible to previous versions and since the url was not a regex it should not be now. Another reason is just performance. Your patch compiled the regex on every request. This takes time. It is better to store the regex class somewhere. And another hint: you don't need to free the regex explicitely. It is done by the destructor automatically.
And now to your new question. The problem is, that the body in the request is not meant for deliver the body to the responder. That sounds strange, I know. And therefore I changed it ;-). The Request-class is used in http server as well as in client. The body is used, when I use the Request-class as a client. But indeed it does not hurt to use it in server code as well. Previously a responder was asked to read the body from the stream by overriding the method "std::size_t Responder::readBody(std::istream&)". The default implementation just discarded the body. Tommi Am Sonntag, Juni 05, 2011, 18:26:08 schrieb Michael Eiler: > Hi, > > thank you very much for implementing the regex-support in libcxxtools, I > already changed my vdr-plugin to support the newest revision. > > But I still have one problem regarding something different: > > The method request.bodyStr() always returns an empty string. > > The following few lines contain an example HTTP Request which I use to > test the server functionality: > > > POST /timers HTTP/1.1 > Content-Length: 30 > Content-Type: text/plain > Connection: close > > file=asdf&start=2015&stop=2230 > > > Source code: > https://github.com/yavdr/vdr-plugin-restfulapi/blob/cac4d1c8584036cd85ae929 > a2b1abc57df06a2c6/timers.cpp > > > Where is my mistake? > > Thank you for your help! > > nice regards > Michael > > --------------------------------------------------------------------------- > --- Simplify data backup and recovery for your virtual environment with > vRanger. Installation's a snap, and flexible recovery options mean your > data is safe, secure and there when you need it. Discover what all the > cheering's about. Get your free trial download today. > http://p.sf.net/sfu/quest-dev2dev2 > _______________________________________________ > Tntnet-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/tntnet-general ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Tntnet-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tntnet-general
