From: Jeroen H. <vex...@gm...> - 2010-01-09 22:52:34
|
Hi, A friend of mine just ran into a corner-case bug in the url_encode function in "boost/network/protocol/http/impl/message.ipp". In the current 0.5-devel tree it's on line 82, 'sprintf(encode_buf+1, "%2X", str[pos]);' to be specific. The format string there should be changed to "%02X" to reflect the zero padding (instead of the default space padding), as one-character letters such as '\n' are now encoded as '% A' (space, A) instead of '%0A' (zero, A). Thanks, Jeroen |
From: Dean M. B. <mik...@gm...> - 2010-01-10 14:45:26
|
Hi Jeroen, On Sun, Jan 10, 2010 at 6:52 AM, Jeroen Habraken <vex...@gm...> wrote: > Hi, > > A friend of mine just ran into a corner-case bug in the url_encode > function in "boost/network/protocol/http/impl/message.ipp". In the > current 0.5-devel tree it's on line 82, 'sprintf(encode_buf+1, "%2X", > str[pos]);' to be specific. The format string there should be changed > to "%02X" to reflect the zero padding (instead of the default space > padding), as one-character letters such as '\n' are now encoded as '% > A' (space, A) instead of '%0A' (zero, A). > Thanks for the report. If you can fix in a patch that would be most helpful too. Actually this was ported in still from pion, and is somewhat "unsupported" yet. I'd prefer this to be re-implemented using Boost.Spirit's Karma. Let me file an issue in the cpp-netlib project so that we can track this properly. Have a good day and I hope to see patches for this soon too. ;) -- Dean Michael Berris cplusplus-soup.com | twitter.com/deanberris linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com |
From: Jeroen H. <vex...@gm...> - 2010-01-10 14:57:58
|
Hi Dean, On Sun, Jan 10, 2010 at 15:44, Dean Michael Berris <mik...@gm...> wrote: > Hi Jeroen, > > On Sun, Jan 10, 2010 at 6:52 AM, Jeroen Habraken <vex...@gm...> wrote: >> Hi, >> >> A friend of mine just ran into a corner-case bug in the url_encode >> function in "boost/network/protocol/http/impl/message.ipp". In the >> current 0.5-devel tree it's on line 82, 'sprintf(encode_buf+1, "%2X", >> str[pos]);' to be specific. The format string there should be changed >> to "%02X" to reflect the zero padding (instead of the default space >> padding), as one-character letters such as '\n' are now encoded as '% >> A' (space, A) instead of '%0A' (zero, A). >> > > Thanks for the report. If you can fix in a patch that would be most helpful too. > > Actually this was ported in still from pion, and is somewhat > "unsupported" yet. I'd prefer this to be re-implemented using > Boost.Spirit's Karma. I'd too love to see this re-implemented using Boost.Spirit's Karma. > > Let me file an issue in the cpp-netlib project so that we can track > this properly. > > Have a good day and I hope to see patches for this soon too. ;) > Sure, I'll write one this evening, and attach it to the issue, it's rather trivial anyway. Jeroen |
From: Dean M. B. <mik...@gm...> - 2010-01-10 15:29:12
|
On Sun, Jan 10, 2010 at 10:57 PM, Jeroen Habraken <vex...@gm...> wrote: > Hi Dean, > > On Sun, Jan 10, 2010 at 15:44, Dean Michael Berris > <mik...@gm...> wrote: >> >> Thanks for the report. If you can fix in a patch that would be most helpful too. >> >> Actually this was ported in still from pion, and is somewhat >> "unsupported" yet. I'd prefer this to be re-implemented using >> Boost.Spirit's Karma. > > I'd too love to see this re-implemented using Boost.Spirit's Karma. > Sounds like something that would be nice for you to work on. ;) >> >> Let me file an issue in the cpp-netlib project so that we can track >> this properly. >> >> Have a good day and I hope to see patches for this soon too. ;) >> > > Sure, I'll write one this evening, and attach it to the issue, it's > rather trivial anyway. > Thanks, you can see the issue here: http://github.com/mikhailberis/cpp-netlib/issues/#issue/1 -- Dean Michael Berris cplusplus-soup.com | twitter.com/deanberris linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com |
From: Jeroen H. <vex...@gm...> - 2010-01-10 18:26:27
|
On Sun, Jan 10, 2010 at 16:28, Dean Michael Berris <mik...@gm...> wrote: > On Sun, Jan 10, 2010 at 10:57 PM, Jeroen Habraken <vex...@gm...> wrote: >> Hi Dean, >> >> On Sun, Jan 10, 2010 at 15:44, Dean Michael Berris >> <mik...@gm...> wrote: >>> >>> Thanks for the report. If you can fix in a patch that would be most helpful too. >>> >>> Actually this was ported in still from pion, and is somewhat >>> "unsupported" yet. I'd prefer this to be re-implemented using >>> Boost.Spirit's Karma. >> >> I'd too love to see this re-implemented using Boost.Spirit's Karma. >> > > Sounds like something that would be nice for you to work on. ;) Sure. >>> >>> Let me file an issue in the cpp-netlib project so that we can track >>> this properly. >>> >>> Have a good day and I hope to see patches for this soon too. ;) >>> >> >> Sure, I'll write one this evening, and attach it to the issue, it's >> rather trivial anyway. >> > > Thanks, you can see the issue here: > > http://github.com/mikhailberis/cpp-netlib/issues/#issue/1 > > > -- > Dean Michael Berris > cplusplus-soup.com | twitter.com/deanberris > linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com > FYI, http://github.com/mikhailberis/cpp-netlib/issues#issue/1/comment/107139 Jeroen |
From: Dean M. B. <mik...@gm...> - 2010-01-10 18:30:15
|
On Mon, Jan 11, 2010 at 2:26 AM, Jeroen Habraken <vex...@gm...> wrote: > On Sun, Jan 10, 2010 at 16:28, Dean Michael Berris > <mik...@gm...> wrote: >> >> Sounds like something that would be nice for you to work on. ;) > > Sure. > :) >> >> Thanks, you can see the issue here: >> >> http://github.com/mikhailberis/cpp-netlib/issues/#issue/1 >> > > FYI, http://github.com/mikhailberis/cpp-netlib/issues#issue/1/comment/107139 > Thanks, I'm applying and pushing the code as soon as the tests all pass. That reminds me, we should be testing this code especially because we ship it. I'll be adding another set of issues regarding this. Thanks again Jeroen! -- Dean Michael Berris cplusplus-soup.com | twitter.com/deanberris linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com |
From: Jeroen H. <vex...@gm...> - 2010-01-10 18:44:47
|
On Sun, Jan 10, 2010 at 19:29, Dean Michael Berris <mik...@gm...> wrote: > On Mon, Jan 11, 2010 at 2:26 AM, Jeroen Habraken <vex...@gm...> wrote: >> On Sun, Jan 10, 2010 at 16:28, Dean Michael Berris >> <mik...@gm...> wrote: >>> >>> Sounds like something that would be nice for you to work on. ;) >> >> Sure. >> > > :) > >>> >>> Thanks, you can see the issue here: >>> >>> http://github.com/mikhailberis/cpp-netlib/issues/#issue/1 >>> >> >> FYI, http://github.com/mikhailberis/cpp-netlib/issues#issue/1/comment/107139 >> > > Thanks, I'm applying and pushing the code as soon as the tests all pass. A checkout of the master seems to pass all tests here on my machine, Linux x86 with GCC 4.4.2. > That reminds me, we should be testing this code especially because we ship it. Very much so, though I'm noticing that compiling the tests is quite resource intensive. I've had GCC eat up more than half of my gigabyte of RAM, with the HTTP 1.1 tests taken more than a couple of minutes. > I'll be adding another set of issues regarding this. > > Thanks again Jeroen! > > -- > Dean Michael Berris > cplusplus-soup.com | twitter.com/deanberris > linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com > Jeroen |
From: Dean M. B. <mik...@gm...> - 2010-01-10 19:02:56
|
On Mon, Jan 11, 2010 at 2:44 AM, Jeroen Habraken <vex...@gm...> wrote: > On Sun, Jan 10, 2010 at 19:29, Dean Michael Berris > <mik...@gm...> wrote: >> >> Thanks, I'm applying and pushing the code as soon as the tests all pass. > > A checkout of the master seems to pass all tests here on my machine, > Linux x86 with GCC 4.4.2. > I meant after I applied the patch. :) It's in branch 0.5-devel now. >> That reminds me, we should be testing this code especially because we ship it. > > Very much so, though I'm noticing that compiling the tests is quite > resource intensive. I've had GCC eat up more than half of my gigabyte > of RAM, with the HTTP 1.1 tests taken more than a couple of minutes. > Yes, I see the same thing. I'll look at addressing the HTTP 1.1 test issues if I can. The build time and resource requirements are really a little disturbing to me, but then I think that is the nature of the beast that is C++ and C++ template metaprogramming. Currently it's not high up on my list because I'm concentrating on implementing functionality first rather than optimizing the build/test times -- but maybe it has come to the point where the limits of GCC is being hit by just the sheer amount of code we include when boost/network.hpp is included. It may be time for me to modularize the includes and hopefully I get some motivation to do that *soon*. ;) I'll add issues to the implementation -- if you have any issues and feel like logging them in please feel free to do so (and this applies to everyone too: http://github.com/mikhailberis/cpp-netlib/issues). Have a good one and I hope this helps! -- Dean Michael Berris cplusplus-soup.com | twitter.com/deanberris linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com |
From: Jeroen H. <vex...@gm...> - 2010-01-10 19:14:41
|
On Sun, Jan 10, 2010 at 20:02, Dean Michael Berris <mik...@gm...> wrote: > On Mon, Jan 11, 2010 at 2:44 AM, Jeroen Habraken <vex...@gm...> wrote: >> On Sun, Jan 10, 2010 at 19:29, Dean Michael Berris >> <mik...@gm...> wrote: >>> >>> Thanks, I'm applying and pushing the code as soon as the tests all pass. >> >> A checkout of the master seems to pass all tests here on my machine, >> Linux x86 with GCC 4.4.2. >> > > I meant after I applied the patch. :) It's in branch 0.5-devel now. > >>> That reminds me, we should be testing this code especially because we ship it. >> >> Very much so, though I'm noticing that compiling the tests is quite >> resource intensive. I've had GCC eat up more than half of my gigabyte >> of RAM, with the HTTP 1.1 tests taken more than a couple of minutes. >> > > Yes, I see the same thing. > > I'll look at addressing the HTTP 1.1 test issues if I can. The build > time and resource requirements are really a little disturbing to me, > but then I think that is the nature of the beast that is C++ and C++ > template metaprogramming. Currently it's not high up on my list > because I'm concentrating on implementing functionality first rather > than optimizing the build/test times -- but maybe it has come to the > point where the limits of GCC is being hit by just the sheer amount of > code we include when boost/network.hpp is included. The main reason of starting this discussion was that I was seeing the same thing happening to my new URI code as it progressed, with the beautiful but humongous beast that Spirit is. > It may be time for me to modularize the includes and hopefully I get > some motivation to do that *soon*. ;) > > I'll add issues to the implementation -- if you have any issues and > feel like logging them in please feel free to do so (and this applies > to everyone too: http://github.com/mikhailberis/cpp-netlib/issues). > > Have a good one and I hope this helps! You too, and thanks again! > -- > Dean Michael Berris > cplusplus-soup.com | twitter.com/deanberris > linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com > Jeroen |
From: Dean M. B. <mik...@gm...> - 2010-01-10 20:34:23
|
On Mon, Jan 11, 2010 at 3:14 AM, Jeroen Habraken <vex...@gm...> wrote: > On Sun, Jan 10, 2010 at 20:02, Dean Michael Berris >> >> I'll look at addressing the HTTP 1.1 test issues if I can. The build >> time and resource requirements are really a little disturbing to me, >> but then I think that is the nature of the beast that is C++ and C++ >> template metaprogramming. Currently it's not high up on my list >> because I'm concentrating on implementing functionality first rather >> than optimizing the build/test times -- but maybe it has come to the >> point where the limits of GCC is being hit by just the sheer amount of >> code we include when boost/network.hpp is included. > > The main reason of starting this discussion was that I was seeing the > same thing happening to my new URI code as it progressed, with the > beautiful but humongous beast that Spirit is. > Yes, I'm working on something locally that attempts to address this. I've broken up the includes of the Spirit sources and the build times are significantly lower. I'll see if I can reduce this much farther locally first before pushing to github. (BTW, am working on 0.5-devel, just a heads up.) More from me later. :) -- Dean Michael Berris cplusplus-soup.com | twitter.com/deanberris linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com |