Re: [Dclib-devel] Updated server
Brought to you by:
davisking
|
From: Steven V. I. <st...@va...> - 2009-03-18 10:53:40
|
That is maybe better, because than you could read the "raw post" as sometimes it is needed as well. Grtz, Steven 2009/3/18 Davis King <dav...@gm...> > Hmm. Well, what if the body variable just always contains the body (so it > has Content-Length bytes always)? That is the part that I checked into > subversion yesterday. Is that enough to do what you want to be able to > do? Seems like it should be since you can look at the body to see any POST > variables and any other post content. > > -Davis > > > On Wed, Mar 18, 2009 at 5:41 AM, Steven Van Ingelgem < > st...@va...> wrote: > >> Not exactly. >> >> The body contains the body (without the POST if there is a post). >> The post contains ONLY the post variables >> The get contains ONLY the get variables >> The queries contains both the post and the get variables (with the get >> variables overwriting the post if they have the exact same name). >> >> >> 2009/3/18 Davis King <dav...@gm...> >> >> Cool. It's definitely good to have access to the body of the POST data. >>> But why did you add the GET and POST maps? They seem to just contain the >>> same thing as the queries map? >>> >>> -Davis >>> >>> >>> On Tue, Mar 17, 2009 at 3:46 PM, Steven Van Ingelgem < >>> st...@va...> wrote: >>> >>>> After recompiling ;-) >>>> >>>> 2009/3/17 Steven Van Ingelgem <st...@va...> >>>> >>>> Hi Davis, >>>>> >>>>> >>>>> I added parse_url into the server, this way I can get GET, POST or both >>>>> (little like REQUEST in PHP). >>>>> I also added a parameter "body", which is needed for example in case of >>>>> webdav @ "PROPFIND". >>>>> >>>>> >>>>> Grtz, >>>>> Steven >>>>> >>>>> 2009/3/15 Davis King <dav...@gm...> >>>>> >>>>> Nice. I just finished checking all this into subversion. I changed it >>>>>> around a little. The biggest change was I put the two structs you made >>>>>> into the on_request() function's arguments because it occurred to me that >>>>>> otherwise we needed to add thread synchronization to the http_memory map. >>>>>> And that would have been a pain. This is simpler anyway. I'm not sure what >>>>>> I was thinking when I suggested adding those other extra helper function and >>>>>> the map :) >>>>>> >>>>>> So it looks like this now: >>>>>> http://davis.sytes.net/~davis/dlib/server_http_ex.cpp.html<http://davis.sytes.net/%7Edavis/dlib/server_http_ex.cpp.html> >>>>>> And I updated the specification file too: >>>>>> http://davis.sytes.net/~davis/dlib/dlib/server/server_http_abstract.h.html<http://davis.sytes.net/%7Edavis/dlib/dlib/server/server_http_abstract.h.html> >>>>>> >>>>>> Cheers, >>>>>> Davis >>>>>> >>>>>> >>>>>> On Sat, Mar 14, 2009 at 7:34 PM, Steven Van Ingelgem < >>>>>> st...@va...> wrote: >>>>>> >>>>>>> Corrected version (compiles on my linux and windows). Bugfixed all >>>>>>> around via the previous example.cpp. >>>>>>> >>>>>>> Seems to work ok. >>>>>>> >>>>>>> 2009/3/14 Steven Van Ingelgem <st...@va...> >>>>>>> >>>>>>> Please find attached the updated http server for dlib. >>>>>>>> >>>>>>>> Now you can easily extend it to have additional features without >>>>>>>> letting the on_request() string grow. >>>>>>>> >>>>>>>> >>>>>>>> Grtz, >>>>>>>> Steven >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > |