You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(52) |
Jun
(30) |
Jul
(17) |
Aug
(9) |
Sep
(4) |
Oct
(7) |
Nov
(11) |
Dec
(19) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
(1) |
Mar
(37) |
Apr
(28) |
May
(15) |
Jun
(28) |
Jul
(7) |
Aug
(125) |
Sep
(116) |
Oct
(85) |
Nov
(14) |
Dec
(6) |
2009 |
Jan
(11) |
Feb
(4) |
Mar
(5) |
Apr
|
May
(9) |
Jun
(5) |
Jul
(4) |
Aug
(40) |
Sep
(1) |
Oct
(19) |
Nov
(43) |
Dec
(45) |
2010 |
Jan
(76) |
Feb
(95) |
Mar
(3) |
Apr
(23) |
May
(39) |
Jun
(54) |
Jul
(6) |
Aug
(13) |
Sep
(12) |
Oct
(59) |
Nov
(53) |
Dec
(43) |
2011 |
Jan
(43) |
Feb
(44) |
Mar
(25) |
Apr
(23) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(2) |
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
|
From: Александр М. <am...@ma...> - 2010-08-05 10:06:42
|
Hello! I want to implement HTTP-like client and server over UDP. It is used in Simple Service Discovery Protocol (SSDP), which is the part of UPnP. Now I wrote simple implementation without cpp-netlib. > > Is there the way to use HTTP server on UDP? I want to implement HTTP-like protocol over UDP. That protocol is like HTTP, but works on UDP and have different set of headers, so I need the headers such "Content-Lenght" wouldn't automaticaly added to set of headers. > > > > There *should* be a way to do this, but I'm afraid this is a fringe > requirement that isn't really standard HTTP. With cpp-netlib, I don't > think we will be supporting this anytime soon unless there's real > demand for it. One thing to consider is to use Boost.Asio directly to > do it, sidestepping the HTTP server that cpp-netlib provides. > > Another thing worth thinking about is supporting SCTP, which is > gaining popularity for internal network communications for high > throughput networking requirements. This is something that Boost.Asio > is yet to support and is still in the early stages of support. > > Until Boost.Asio supports SCTP I might not be inclined to support it > earlier than that. ;) > > HTH! > > -- > Dean Michael Berris > deanberris.com > Alex Martynov |
From: Dean M. B. <mik...@gm...> - 2010-08-05 05:48:26
|
Hi Alex! Sorry about the really late response, this is embarrassing to me -- I'm usually not this late when responding. That said, please see below. 2010/7/21 Александр Мартынов <am...@ma...>: > Hello! > > Is there the way to use HTTP server on UDP? I want to implement HTTP-like protocol over UDP. That protocol is like HTTP, but works on UDP and have different set of headers, so I need the headers such "Content-Lenght" wouldn't automaticaly added to set of headers. > There *should* be a way to do this, but I'm afraid this is a fringe requirement that isn't really standard HTTP. With cpp-netlib, I don't think we will be supporting this anytime soon unless there's real demand for it. One thing to consider is to use Boost.Asio directly to do it, sidestepping the HTTP server that cpp-netlib provides. Another thing worth thinking about is supporting SCTP, which is gaining popularity for internal network communications for high throughput networking requirements. This is something that Boost.Asio is yet to support and is still in the early stages of support. Until Boost.Asio supports SCTP I might not be inclined to support it earlier than that. ;) HTH! -- Dean Michael Berris deanberris.com |
From: Dean M. B. <mik...@gm...> - 2010-08-05 05:06:58
|
Hi Alex, 2010/8/4 Александр Мартынов <am...@ma...>: > Hello, > > I'm using cpp-netlib v0.5 in my http server and I want to get remote > (peer) IP-address when I handle request. How I can get it? > You can check the source of the request object that gets passed into the handler. You can do this by doing: string ip = source(request); If this doesn't work then that should be a bug. :) HTH (BTW, you might want to use 0.6 instead of 0.5). -- Dean Michael Berris deanberris.com |
From: Александр М. <am...@ma...> - 2010-08-04 11:53:27
|
Hello, I'm using cpp-netlib v0.5 in my http server and I want to get remote (peer) IP-address when I handle request. How I can get it? ________________________________________________ With regards, Alex Martynov mailto: am...@ma... |
From: Александр М. <am...@ma...> - 2010-07-24 07:27:01
|
Hello Glyn, Thursday, July 22, 2010, 5:54:20 PM, you wrote: GM> Hello Alex, GM> 2010/7/21 Александр Мартынов <am...@ma...> GM> Hello! GM> Sorry, I am not a developer, I am simply interesting on GM> cpp-netlib library, but I was not found any support mailing list. GM> My questions are: GM> 1) HTTP client and SSL. How I can compile client without HTTPS GM> support (which adds dependency on openssl library). I try to GM> define BOOST_NETWORK_NO_HTTPS, but it not work. I try to lookup in GM> code for BOOST_NETWORK_NO_HTTPS or BOOST_NETWORK_HTTPS, but there is no occurences found. GM> Some https features found in GM> boost\network\protocol\http\impl\sync_connection_base.hpp, but GM> they are unconditional and can't be stripped. GM> What version of cpp-netlib are you using? There was a discussion GM> about this a month and a half ago and the decision was to define a GM> macro BOOST_NETWORK_ENABLE_HTTPS in order to explicitly opt-in to GM> using SSL. However, this has not yet been implemented. It is not GM> possible to compile the HTTP client without SSL in the current release (0.6). GM> http://www.mail-archive.com/cpp...@li.../msg00443.html I am using version 0.5 of cpp-netlib. I was read that discussion, but wasn't understand is that implemented or not. I think this point is important to implement - library will be more lightweight when external dependecies will be removed. GM> 2) cpp-netlib is hard C++ library, and I can't understand it. GM> The internal details can be quite obscure, but it is a stated GM> goal that using the library should not be hard to do. Admittedly, GM> the documentation is still incomplete but I am making an effort to GM> make it more accessible. If you have anything specific you want GM> addressed, please let me know and I will try to deal with it. GM> GM> I think that HTTP server (in sample) is serial (not a parallel) GM> and handles requests consistently. Hard worker requests can easy GM> get denial of service when incoming connection overfull connection GM> accept queue. I am right? Is the way to make parallel server, GM> which handles requess in different threads? GM> I think you're right. The HTTP server provided is very simple, GM> but eventually cpp-netlib ought to provide the building blocks for GM> more complex servers. I know Dean has more ideas on this, he GM> could let you know more about his plans. Usage is quite simple, if that described in documentation ;) But its much incomplete, and research for details is difficult. Alex Martynov |
From: Glyn M. <gly...@gm...> - 2010-07-22 13:54:28
|
Hello Alex, 2010/7/21 Александр Мартынов <am...@ma...> > Hello! > > Sorry, I am not a developer, I am simply interesting on cpp-netlib > library, but I was not found any support mailing list. > > My questions are: > 1) HTTP client and SSL. How I can compile client without HTTPS support > (which adds dependency on openssl library). I try to define > BOOST_NETWORK_NO_HTTPS, but it not work. I try to lookup in code for > BOOST_NETWORK_NO_HTTPS or BOOST_NETWORK_HTTPS, but there is no occurences > found. > Some https features found in > boost\network\protocol\http\impl\sync_connection_base.hpp, but they are > unconditional and can't be stripped. > What version of cpp-netlib are you using? There was a discussion about this a month and a half ago and the decision was to define a macro BOOST_NETWORK_ENABLE_HTTPS in order to explicitly opt-in to using SSL. However, this has not yet been implemented. It is not possible to compile the HTTP client without SSL in the current release (0.6). http://www.mail-archive.com/cpp...@li.../msg00443.html > > 2) cpp-netlib is hard C++ library, and I can't understand it. > The internal details can be quite obscure, but it is a stated goal that using the library should not be hard to do. Admittedly, the documentation is still incomplete but I am making an effort to make it more accessible. If you have anything specific you want addressed, please let me know and I will try to deal with it. > I think that HTTP server (in sample) is serial (not a parallel) and handles > requests consistently. Hard worker requests can easy get denial of service > when incoming connection overfull connection accept queue. I am right? Is > the way to make parallel server, which handles requess in different threads? > I think you're right. The HTTP server provided is very simple, but eventually cpp-netlib ought to provide the building blocks for more complex servers. I know Dean has more ideas on this, he could let you know more about his plans. > > 3) Is there way to stop client from other thread? > Such illustrated above: > -- worker thread -- > client.get(); // client.post() etc > ------------------- > > -- GUI thread -- > if (canceled && client.in_progress()) client.abort(); > ---------------- > > Or, may be there is the way to install callback which periodicaly receives > client status events (such as "resolving", "connecting", "awaiting_reply") > and can return value to signal that abort needed (true for continue, false > to abort, as sample) > > Or, may be client can be used in async mode such here: > client.get(); > while( not canceled and client.in_progress() and not client.done()) {} As Dean already mentioned, he is working on an asynchronous HTTP client so I will leave it to him to respond more fully to this. > 4) Is there the way to make secure (https) server? > > Yes, but as with (2) it's simply a matter of implementing it. Regards, Glyn |
From: Александр М. <am...@ma...> - 2010-07-22 07:00:40
|
Thanks Michael, I hope that async client will be coming soon. Wed, 21 Jul 2010 22:16:53 +0800 письмо от Dean Michael Berris <mik...@gm...>: > > Hi Alex, I'm currently in the middle of a project that is requiring my 100% attention, so I may not be able to respond right away. I'll let the others on the list respond but I am working on an asynchronous client implementation. I'll say more when I'm at a full computer. Hope this helps. > > Sent from my Motorola Milestone > > On 21 Jul 2010 17:53, "Александр Мартынов" <am...@ma...> wrote: > > Hello! > > Sorry, I am not a developer, I am simply interesting on cpp-netlib library, but I was not found any support mailing list. > > My questions are: > 1) HTTP client and SSL. How I can compile client without HTTPS support (which adds dependency on openssl library). I try to define BOOST_NETWORK_NO_HTTPS, but it not work. I try to lookup in code for BOOST_NETWORK_NO_HTTPS or BOOST_NETWORK_HTTPS, but there is no occurences found. > Some https features found in boost\network\protocol\http\impl\sync_connection_base.hpp, but they are unconditional and can't be stripped. > > 2) cpp-netlib is hard C++ library, and I can't understand it. > I think that HTTP server (in sample) is serial (not a parallel) and handles requests consistently. Hard worker requests can easy get denial of service when incoming connection overfull connection accept queue. I am right? Is the way to make parallel server, which handles requess in different threads? > > 3) Is there way to stop client from other thread? > Such illustrated above: > -- worker thread -- > client.get(); // client.post() etc > ------------------- > > -- GUI thread -- > if (canceled && client.in_progress()) client.abort(); > ---------------- > > Or, may be there is the way to install callback which periodicaly receives client status events (such as "resolving", "connecting", "awaiting_reply") and can return value to signal that abort needed (true for continue, false to abort, as sample) > > Or, may be client can be used in async mode such here: > client.get(); > while( not canceled and client.in_progress() and not client.done()) {} > > 4) Is there the way to make secure (https) server? > > > Thank you for your attention, > Alex Martynov. > > > ------------------------------------------------------------------------------ > 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 > _______________________________________________ > Cpp-netlib-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel > > ------------------------------------------------------------------------------ > 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 > _______________________________________________ > Cpp-netlib-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel Alex Martynov |
From: Dean M. B. <mik...@gm...> - 2010-07-21 14:17:03
|
Hi Alex, I'm currently in the middle of a project that is requiring my 100% attention, so I may not be able to respond right away. I'll let the others on the list respond but I am working on an asynchronous client implementation. I'll say more when I'm at a full computer. Hope this helps. Sent from my Motorola Milestone On 21 Jul 2010 17:53, "Александр Мартынов" <am...@ma...> wrote: Hello! Sorry, I am not a developer, I am simply interesting on cpp-netlib library, but I was not found any support mailing list. My questions are: 1) HTTP client and SSL. How I can compile client without HTTPS support (which adds dependency on openssl library). I try to define BOOST_NETWORK_NO_HTTPS, but it not work. I try to lookup in code for BOOST_NETWORK_NO_HTTPS or BOOST_NETWORK_HTTPS, but there is no occurences found. Some https features found in boost\network\protocol\http\impl\sync_connection_base.hpp, but they are unconditional and can't be stripped. 2) cpp-netlib is hard C++ library, and I can't understand it. I think that HTTP server (in sample) is serial (not a parallel) and handles requests consistently. Hard worker requests can easy get denial of service when incoming connection overfull connection accept queue. I am right? Is the way to make parallel server, which handles requess in different threads? 3) Is there way to stop client from other thread? Such illustrated above: -- worker thread -- client.get(); // client.post() etc ------------------- -- GUI thread -- if (canceled && client.in_progress()) client.abort(); ---------------- Or, may be there is the way to install callback which periodicaly receives client status events (such as "resolving", "connecting", "awaiting_reply") and can return value to signal that abort needed (true for continue, false to abort, as sample) Or, may be client can be used in async mode such here: client.get(); while( not canceled and client.in_progress() and not client.done()) {} 4) Is there the way to make secure (https) server? Thank you for your attention, Alex Martynov. ------------------------------------------------------------------------------ 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 _______________________________________________ Cpp-netlib-devel mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel |
From: Александр М. <am...@ma...> - 2010-07-21 12:07:29
|
Hello! Is there the way to use HTTP server on UDP? I want to implement HTTP-like protocol over UDP. That protocol is like HTTP, but works on UDP and have different set of headers, so I need the headers such "Content-Lenght" wouldn't automaticaly added to set of headers. Alex Martynov |
From: Александр М. <am...@ma...> - 2010-07-21 09:53:26
|
Hello! Sorry, I am not a developer, I am simply interesting on cpp-netlib library, but I was not found any support mailing list. My questions are: 1) HTTP client and SSL. How I can compile client without HTTPS support (which adds dependency on openssl library). I try to define BOOST_NETWORK_NO_HTTPS, but it not work. I try to lookup in code for BOOST_NETWORK_NO_HTTPS or BOOST_NETWORK_HTTPS, but there is no occurences found. Some https features found in boost\network\protocol\http\impl\sync_connection_base.hpp, but they are unconditional and can't be stripped. 2) cpp-netlib is hard C++ library, and I can't understand it. I think that HTTP server (in sample) is serial (not a parallel) and handles requests consistently. Hard worker requests can easy get denial of service when incoming connection overfull connection accept queue. I am right? Is the way to make parallel server, which handles requess in different threads? 3) Is there way to stop client from other thread? Such illustrated above: -- worker thread -- client.get(); // client.post() etc ------------------- -- GUI thread -- if (canceled && client.in_progress()) client.abort(); ---------------- Or, may be there is the way to install callback which periodicaly receives client status events (such as "resolving", "connecting", "awaiting_reply") and can return value to signal that abort needed (true for continue, false to abort, as sample) Or, may be client can be used in async mode such here: client.get(); while( not canceled and client.in_progress() and not client.done()) {} 4) Is there the way to make secure (https) server? Thank you for your attention, Alex Martynov. |
From: Dean M. B. <mik...@gm...> - 2010-06-23 04:29:13
|
On Wed, Jun 23, 2010 at 5:26 AM, Glyn Matthews <gly...@gm...> wrote: > Hi Dean, > > On 22 June 2010 12:06, Dean Michael Berris <mik...@gm...> wrote: >> >> Hi Guys, >> >> I've been working on something that allows for better tag composition >> in cpp-netlib. The idea is to actually now use template >> metaprogramming provided by Boost.MPL to differentiate whether tags >> denote certain properties. This should make tag specialization easier: >> >> struct foo : async, http {}; >> >> We can the query whether: >> >> is_async<foo>::value // either boolean constant true or false >> is_async<foo>::type // either mpl::true_ or mpl::false_ >> >> This makes overloading the policy dispatcher metafunction >> significantly easier to extend. >> >> Thoughts? Comments? > > This would be very useful. I haven't been able to test it yet, but what is > the impact on compilation times? > In Debug mode, the symbols take time to write out. Other than that the compile times on MSVC 2010 in Windows 7 are still long, marginally longer than the last release when building the tests. The use of the MPL is only in select areas, hopefully it doesn't make compile times completely unbearable on Linux with GCC. Looking forward to your comments and experiences -- BTW, the http client tests are still broken on 0.7-devel because I pushed in the middle of fleshing out the asynchronous HTTP client implementation. I'll see whether I can finish that within the week, given that I've just recently had time to dedicate for that now. ;) -- Dean Michael Berris deanberris.com |
From: Glyn M. <gly...@gm...> - 2010-06-22 21:26:47
|
Hi Dean, On 22 June 2010 12:06, Dean Michael Berris <mik...@gm...> wrote: > Hi Guys, > > I've been working on something that allows for better tag composition > in cpp-netlib. The idea is to actually now use template > metaprogramming provided by Boost.MPL to differentiate whether tags > denote certain properties. This should make tag specialization easier: > > struct foo : async, http {}; > > We can the query whether: > > is_async<foo>::value // either boolean constant true or false > is_async<foo>::type // either mpl::true_ or mpl::false_ > > This makes overloading the policy dispatcher metafunction > significantly easier to extend. > > Thoughts? Comments? > This would be very useful. I haven't been able to test it yet, but what is the impact on compilation times? G |
From: Dean M. B. <mik...@gm...> - 2010-06-22 10:07:01
|
Hi Guys, I've been working on something that allows for better tag composition in cpp-netlib. The idea is to actually now use template metaprogramming provided by Boost.MPL to differentiate whether tags denote certain properties. This should make tag specialization easier: struct foo : async, http {}; We can the query whether: is_async<foo>::value // either boolean constant true or false is_async<foo>::type // either mpl::true_ or mpl::false_ This makes overloading the policy dispatcher metafunction significantly easier to extend. Thoughts? Comments? HTH -- Dean Michael Berris deanberris.com |
From: Richy <kle...@gm...> - 2010-06-11 12:50:18
|
Thank you so much for that fast, easy and friendly reply. It is very much appreciated. On Fri, Jun 11, 2010 at 03:55, Dean Michael Berris <mik...@gm...> wrote: > On Fri, Jun 11, 2010 at 3:50 PM, Jeroen Habraken <vex...@gm...> wrote: >> On 11 June 2010 09:37, Dean Michael Berris <mik...@gm...> wrote: >>> >>> Yeah... So you'll do it then? :D >>> >> >> Sure, I can't give you and ETA though, I'm way too busy at the moment. >> > > No worries, I don't like giving ETA's too since I'm doing this on my > free time as well. ;) > > Have a great weekend! > > -- > Dean Michael Berris > deanberris.com > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Cpp-netlib-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel > |
From: Dean M. B. <mik...@gm...> - 2010-06-11 07:55:47
|
On Fri, Jun 11, 2010 at 3:50 PM, Jeroen Habraken <vex...@gm...> wrote: > On 11 June 2010 09:37, Dean Michael Berris <mik...@gm...> wrote: >> >> Yeah... So you'll do it then? :D >> > > Sure, I can't give you and ETA though, I'm way too busy at the moment. > No worries, I don't like giving ETA's too since I'm doing this on my free time as well. ;) Have a great weekend! -- Dean Michael Berris deanberris.com |
From: Jeroen H. <vex...@gm...> - 2010-06-11 07:50:59
|
On 11 June 2010 09:37, Dean Michael Berris <mik...@gm...> wrote: > On Fri, Jun 11, 2010 at 3:28 PM, Jeroen Habraken <vex...@gm...> wrote: >> >> On 11 June 2010 05:32, Dean Michael Berris <mik...@gm...> wrote: >>> >>> That said, it would be nice if someone can write a urlencode function >>> -- maybe as a Karma generator? :D Any takers? >>> >>> I would love to see one in boost/network/protocol/http/utils/ -- so if >>> you have tests and an implementation on your fork, I would love to get >>> this in 0.7. :) >>> >> >> There's a url_decode and url_encode function already in >> http://github.com/mikhailberis/cpp-netlib/blob/master/boost/network/protocol/http/impl/message.ipp. >> Though I agree a Karma version would look better :) >> > > Yeah... So you'll do it then? :D > > -- > Dean Michael Berris > deanberris.com > Sure, I can't give you and ETA though, I'm way too busy at the moment. Jeroen |
From: Dean M. B. <mik...@gm...> - 2010-06-11 07:37:30
|
On Fri, Jun 11, 2010 at 3:28 PM, Jeroen Habraken <vex...@gm...> wrote: > > On 11 June 2010 05:32, Dean Michael Berris <mik...@gm...> wrote: >> >> That said, it would be nice if someone can write a urlencode function >> -- maybe as a Karma generator? :D Any takers? >> >> I would love to see one in boost/network/protocol/http/utils/ -- so if >> you have tests and an implementation on your fork, I would love to get >> this in 0.7. :) >> > > There's a url_decode and url_encode function already in > http://github.com/mikhailberis/cpp-netlib/blob/master/boost/network/protocol/http/impl/message.ipp. > Though I agree a Karma version would look better :) > Yeah... So you'll do it then? :D -- Dean Michael Berris deanberris.com |
From: Jeroen H. <vex...@gm...> - 2010-06-11 07:29:03
|
Hi, On 11 June 2010 05:32, Dean Michael Berris <mik...@gm...> wrote: > Hi Richy, > > On Fri, Jun 11, 2010 at 10:41 AM, Richy <kle...@gm...> wrote: >> Dear List, >> >> this is probably a rather simple question, however I have failed to >> find a solution. >> >> I'm trying to use cpp-netlib with couchdb in a project. >> CouchDB uses Views to get data and it is possible to filter result by >> passing a key. In my case that key would be in the form of: >> ["key1", "key2"] >> >> I figured out that one has to manually escape the quotation-signs, but >> I'm not aware of am escape sequence for the [ sign. However, it >> doesn't get transmitted and the rest is skipped as well. >> sample-Code. > > You will need to use %5B for '[' and %5D for ']'. > > You can get a table from http://www.w3schools.com/TAGS/ref_urlencode.asp > > That said, it would be nice if someone can write a urlencode function > -- maybe as a Karma generator? :D Any takers? > > I would love to see one in boost/network/protocol/http/utils/ -- so if > you have tests and an implementation on your fork, I would love to get > this in 0.7. :) > > -- > Dean Michael Berris > deanberris.com > There's a url_decode and url_encode function already in http://github.com/mikhailberis/cpp-netlib/blob/master/boost/network/protocol/http/impl/message.ipp. Though I agree a Karma version would look better :) Jeroen |
From: Dean M. B. <mik...@gm...> - 2010-06-11 03:35:58
|
On Fri, Jun 11, 2010 at 5:29 AM, Glyn Matthews <gly...@gm...> wrote: > Hi Dean, > > On 10 June 2010 13:27, Dean Michael Berris <mik...@gm...> wrote: [snip] >> >> Let me know if you have any questions or if you have better ideas on >> how to make this a little less repetitive (the overloads). I'm not >> opposed to doing template metaprogramming -- on the contrary I would >> love it more if there was a cleaner way for doing the refactoring. > > I can't comment yet on this, but I'm getting so many compilation failures I > don't even know where to start (Linux, GCC 4.4.3). It seems there are some > missing headers (for sure > boost/network/protocol/http/message/message_base.hpp). Ack! I'll fix that. My bad, I was avoiding checking in my work in progress on the asynchronous stuff. Let me check in a dirty implementation that should allow the thing to compile. -- Dean Michael Berris deanberris.com |
From: Dean M. B. <mik...@gm...> - 2010-06-11 03:33:15
|
Hi Richy, On Fri, Jun 11, 2010 at 10:41 AM, Richy <kle...@gm...> wrote: > Dear List, > > this is probably a rather simple question, however I have failed to > find a solution. > > I'm trying to use cpp-netlib with couchdb in a project. > CouchDB uses Views to get data and it is possible to filter result by > passing a key. In my case that key would be in the form of: > ["key1", "key2"] > > I figured out that one has to manually escape the quotation-signs, but > I'm not aware of am escape sequence for the [ sign. However, it > doesn't get transmitted and the rest is skipped as well. > sample-Code. You will need to use %5B for '[' and %5D for ']'. You can get a table from http://www.w3schools.com/TAGS/ref_urlencode.asp That said, it would be nice if someone can write a urlencode function -- maybe as a Karma generator? :D Any takers? I would love to see one in boost/network/protocol/http/utils/ -- so if you have tests and an implementation on your fork, I would love to get this in 0.7. :) -- Dean Michael Berris deanberris.com |
From: Richy <kle...@gm...> - 2010-06-11 02:41:35
|
Dear List, this is probably a rather simple question, however I have failed to find a solution. I'm trying to use cpp-netlib with couchdb in a project. CouchDB uses Views to get data and it is possible to filter result by passing a key. In my case that key would be in the form of: ["key1", "key2"] I figured out that one has to manually escape the quotation-signs, but I'm not aware of am escape sequence for the [ sign. However, it doesn't get transmitted and the rest is skipped as well. sample-Code. std::string requestURI = dbUrl; requestURI.append("/_design/user/_view/getUserHistory?key=[%22"); requestURI.append(missionID); requestURI.append("%22,%22"); requestURI.append(userID); requestURI.append("%22]"); http::client client(http::client::follow_redirects); http::client::request request(requestURI); http::client::response response = client.get(request); I hope the answer is not too obvious but still out there. Any help would be appreciated! Thanks a lot Richard |
From: Glyn M. <gly...@gm...> - 2010-06-10 21:29:24
|
Hi Dean, On 10 June 2010 13:27, Dean Michael Berris <mik...@gm...> wrote: > Good day guys, > > > > All of this is already in the branch 0.7-devel and I intend to gut the > implementations as well and add more concept checks to ensure that we > fix the wrapper, directives, and modifiers to use concepts all around. > I'll finish up the message-related gutting that I am doing, > implementing the concepts to all the wrappers and directives that are > already there. Hopefully I can settle with something that is > acceptable and extensible. > > Let me know if you have any questions or if you have better ideas on > how to make this a little less repetitive (the overloads). I'm not > opposed to doing template metaprogramming -- on the contrary I would > love it more if there was a cleaner way for doing the refactoring. > I can't comment yet on this, but I'm getting so many compilation failures I don't even know where to start (Linux, GCC 4.4.3). It seems there are some missing headers (for sure boost/network/protocol/http/message/message_base.hpp). Glyn |
From: Dean M. B. <mik...@gm...> - 2010-06-10 11:27:59
|
Good day guys, I've been working on/off on the asynchronous HTTP client and I see that there's quite a number of things missing on the message side to be able to support the addition of new constructs to future-wrapped data. Let me explain a little. Currently, the basic_response template has an interface that allows wrappers and directives to reach into the guts of the message and then deal with the members that basic_response defines. Now that I've standardized the message concept to support wrappers and directives, it seems this is not enough for the asynchronous futures-based world. Consider: struct basic_response { boost::future<string> status_message; }; basic_response msg; msg << status_message("yadda"); // [1] string s = status_message(msg); // [2] There's a problem with [1] because the status_message_directive will have to know that message contains a future, and thus use a promise in the function operator overload. Using just this construct it will be a little cumbersome to make things happen, but it's certainly not impossible. For [2] it really should be able to know that the tag for the message is an asynchronous tag. The number of specializations will be a little crazy if we overloaded for every asynchronous tag we were going to implement/support. So I made a couple of changes: 1. Message Modifiers. I introduced a new requirement that supports the following syntax: status_message(msg, "yadda"); // [3] boost::promise<string> promised_string; status_message(msg, promised_string.get_future()); // [4] The idea for this is that status_message function can do tag dispatching, based on whether msg is an asynchronous message or a synchronous message (no pun intended) and "do the right thing". 2. Tag Hierarchies. I also introduced some template metaprogramming that allows for meta-tagging tags: namespace tags { struct async {}; struct http_async_8bit_udp_resolve : async {}; } I can then implement an "is_async" metafunction on a tag and determine whether it is derived from tags::async. Then I can dispatch the implementation on whether to understand futures/promises or just do the normal thing. All of this is already in the branch 0.7-devel and I intend to gut the implementations as well and add more concept checks to ensure that we fix the wrapper, directives, and modifiers to use concepts all around. I'll finish up the message-related gutting that I am doing, implementing the concepts to all the wrappers and directives that are already there. Hopefully I can settle with something that is acceptable and extensible. Let me know if you have any questions or if you have better ideas on how to make this a little less repetitive (the overloads). I'm not opposed to doing template metaprogramming -- on the contrary I would love it more if there was a cleaner way for doing the refactoring. Thanks in advance guys and I hope this helps! -- Dean Michael Berris deanberris.com |
From: Ivan J. <ijo...@gm...> - 2010-06-08 17:40:35
|
On Mon, Jun 7, 2010 at 10:39 PM, Dean Michael Berris <mik...@gm... > wrote: > On Tue, Jun 8, 2010 at 1:40 AM, Ivan Johannessen <ijo...@gm...> > wrote: > > > > > > On Sun, Jun 6, 2010 at 7:01 AM, Dean Michael Berris < > mik...@gm...> > > wrote: > >> > >> That's odd, you don't get a body from the HTTP 200 OK response from > >> www.google.com? > >> > > That is correct. > > > > Whan you say you don't get a body, that means cpp-netlib already throws > right? > > Yes. Sorry for not being clear on this. > I checked the RFC again and it seems I forgot to support the case > where the server just streams the contents and closes the connection > without specifying a transfer-encoding nor a content-length (as > described by http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4) > which is an oversight on my part. > > Please file an issue at > http://github.com/mikhailberis/cpp-netlib/issues so I can track the > fix for it. I don't think it would be hard to fix it but I would like > to track work done against it so I can "focus". :) > > Will do. > >> > >> Conforming HTTP 1.1 servers should use an HTTP 204 No Content response > >> instead if it doesn't intend to send a body. Although an HTTP 200 OK > >> should have either a "Content-Length" or "Transfer-Encoding: chunked" > >> last time I checked. > >> > >> I'll try to look deeper into this though, thanks for reporting. > >> > > Ah, looks like google is not doing the right thing. Thanks for a great > lib. > > I'll be using it in a cross platform(Windows/OSX/Linux) app soon. > > Cool, you might want to hold off until I fix the bug with the HTTP 1.1 > client implementation. :) > > Have a great week ahead and I hope this helps! > > -- > Dean Michael Berris > deanberris.com > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Cpp-netlib-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel > |
From: Dean M. B. <mik...@gm...> - 2010-06-08 05:39:32
|
On Tue, Jun 8, 2010 at 1:40 AM, Ivan Johannessen <ijo...@gm...> wrote: > > > On Sun, Jun 6, 2010 at 7:01 AM, Dean Michael Berris <mik...@gm...> > wrote: >> >> That's odd, you don't get a body from the HTTP 200 OK response from >> www.google.com? >> > That is correct. > Whan you say you don't get a body, that means cpp-netlib already throws right? I checked the RFC again and it seems I forgot to support the case where the server just streams the contents and closes the connection without specifying a transfer-encoding nor a content-length (as described by http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4) which is an oversight on my part. Please file an issue at http://github.com/mikhailberis/cpp-netlib/issues so I can track the fix for it. I don't think it would be hard to fix it but I would like to track work done against it so I can "focus". :) >> >> Conforming HTTP 1.1 servers should use an HTTP 204 No Content response >> instead if it doesn't intend to send a body. Although an HTTP 200 OK >> should have either a "Content-Length" or "Transfer-Encoding: chunked" >> last time I checked. >> >> I'll try to look deeper into this though, thanks for reporting. >> > Ah, looks like google is not doing the right thing. Thanks for a great lib. > I'll be using it in a cross platform(Windows/OSX/Linux) app soon. Cool, you might want to hold off until I fix the bug with the HTTP 1.1 client implementation. :) Have a great week ahead and I hope this helps! -- Dean Michael Berris deanberris.com |