sorry!!! i had a lapsus! thanks Sonny! :)
On Fri, Nov 30, 2012 at 7:10 PM, Sonny Karlsson <[email protected]> wrote: > On Fri, Nov 30, 2012 at 01:56:29PM -0600, Eduardo Silva wrote: > > On Fri, Nov 30, 2012 at 1:50 PM, Sonny Karlsson <[email protected]> > wrote: > > > > > Hi > > > > > > I'm answering a bit late, but I definitely think this functionality > > > should be part of the monkey lib so I've created a patch. This patch > > > adds a function for fetching a request header > (mklib_get_request_header) > > > inside a cb_data or cb_close (untested) callback. The function solves > > > this problem almost the same way, but using the headers_toc (headers > > > table of content) instead. > > > > > > On Fri, Nov 30, 2012 at 03:01:52PM +0100, nr wrote: > > > > > > > > I found out as a pointer to the session_request is included in > > > > the callback call, I can add the needed mk structures in a custom > > > > header file and access the http header data in sr->body.data > > > > > > > > It's not pretty, but it do work for my simple needs. > > > > > > > > struct session_request *srp = (struct session_request *) sr; > > > > printf("Data: \"%s\"\n", srp->body.data); > > > > > > > > I'm planing to look into Duda in the future then I'm in need for > > > > more advanced functionality like websockets. Does it work as > > > > embedded library? > > > > > > > > Regards, > > > > Björn > > > > > > > > On Wed, 28 Nov 2012, Eduardo Silva wrote: > > > > > > > > >On Wed, Nov 28, 2012 at 2:19 AM, nr <[email protected]> wrote: > > > > > > > > > >> > > > > >>If I do want to get the HTTP request hearder while in the callback > > > > >>function, how do I do that? > > > > >> > > > > >>In my program I do set a session cookie with unique session id > number > > > that > > > > >>is included in every client request as a single line in the HTTP > > > header. > > > > >> > > > > >>Regards, > > > > >>Bjön > > > > >>_______________________________________________ > > > > >>Monkey mailing list > > > > >>[email protected] > > > > >>http://lists.monkey-project.com/listinfo/monkey > > > > >> > > > > >> > > > > >that is no supported yet in the Library version, if you are playing > with > > > > >cookies and sessions i recommend you to take a look to the Duda > > > framework: > > > > > > > > > > http://duda.io > > > > > > > > > >there you have a few C pseudo-objects to handle sessions, cookies > and > > > > >customize response headers: > > > > > > > > > > http://duda.io/api/session.html > > > > > > > > > >if you want come to irc.freenode.net #monkey so we can give you > further > > > > >assistance, > > > > > > > > > >regards, > > > > > > > > > >-- > > > > >Eduardo Silva > > > > >http://edsiper.linuxchile.cl > > > > >http://www.monkey-project.com > > > > > > > > > > > > _______________________________________________ > > > > Monkey mailing list > > > > [email protected] > > > > http://lists.monkey-project.com/listinfo/monkey > > > > > > > > > -- > > > Sonny Karlsson > > > > > > _______________________________________________ > > > Monkey mailing list > > > [email protected] > > > http://lists.monkey-project.com/listinfo/monkey > > > > > > > > thanks Lauri!, i just pushed the patch to our GIT master. > > > > -- > > Eduardo Silva > > http://edsiper.linuxchile.cl > > http://www.monkey-project.com > > It's Sonny, actually. :] > > -- > Sonny Karlsson > _______________________________________________ > Monkey mailing list > [email protected] > http://lists.monkey-project.com/listinfo/monkey > -- Eduardo Silva http://edsiper.linuxchile.cl http://www.monkey-project.com
_______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
