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: K. G. <kim...@gm...> - 2008-10-09 07:07:49
|
Hi guys, On Thu, Oct 9, 2008 at 00:25, Dean Michael Berris <mik...@gm...> wrote: > >> Nice. I'll play around with it, time permitting. I'm on parental >> leave, so my daily schedule is highly dependent on the whims of my >> one-year-old :-) > > Sweet. :) If you need any help on directives, you can look at how I do > it with the network::message implementation. Yes, I've looked at it a bit already, thanks. > One thing we can do is simply use a Boost.Fusion associative sequence > (a fusion map) like we do now to build and store the URI parts in the > HTTP request's 'uri' method. > > If you think about it, we just need to generalize the URI parsing and > it shouldn't be hard to factor this out. I've already factored this out into a simplistic uri class, but no directive support yet. Not sure I can cook anything up with any speed, but I'm experimenting... - Kim |
From: K. G. <kim...@gm...> - 2008-10-09 07:04:44
|
Hi Dean, Quick one first; On Thu, Oct 9, 2008 at 00:25, Dean Michael Berris <mik...@gm...> wrote: > > If we can do it real soon (along with fixing the Python server tests) > maybe 0.3 will be a more jam-packed release than what I originally > envisioned. ;-) I thought the Python tests were working on Linux now -- what's failing? - Kim |
From: Dean M. B. <mik...@gm...> - 2008-10-08 22:25:08
|
Hey Guys! Sorry I was out for a bit. Personal health issues aside, I should be back on track. On Wed, Oct 8, 2008 at 4:30 AM, Kim Gräsman <kim...@gm...> wrote: > Hi Glyn, > > On Tue, Oct 7, 2008 at 13:19, Glyn Matthews <gly...@gm...> wrote: >> >> boost::network::uri uri("http//www.boost.org/path"); >> uri << query("x=5") << query("y=6"); >> >> Or: >> boost::network::uri boost_org("http//www.boost.org/"); >> boost::network uri; >> uri << boost_org << path("path") << query_param("x", 5); >> >> I think the directives can be considered as helpers, not really as *the* way >> of building URIs. Building URIs from strings will be most common. > I like this! :D > Nice. I'll play around with it, time permitting. I'm on parental > leave, so my daily schedule is highly dependent on the whims of my > one-year-old :-) Sweet. :) If you need any help on directives, you can look at how I do it with the network::message implementation. One thing we can do is simply use a Boost.Fusion associative sequence (a fusion map) like we do now to build and store the URI parts in the HTTP request's 'uri' method. If you think about it, we just need to generalize the URI parsing and it shouldn't be hard to factor this out. If we can do it real soon (along with fixing the Python server tests) maybe 0.3 will be a more jam-packed release than what I originally envisioned. ;-) -- Dean Michael C. Berris Software Engineer, Friendster, Inc. |
From: K. G. <kim...@gm...> - 2008-10-07 20:30:57
|
Hi Glyn, On Tue, Oct 7, 2008 at 13:19, Glyn Matthews <gly...@gm...> wrote: > > boost::network::uri uri("http//www.boost.org/path"); > uri << query("x=5") << query("y=6"); > > Or: > boost::network::uri boost_org("http//www.boost.org/"); > boost::network uri; > uri << boost_org << path("path") << query_param("x", 5); > > I think the directives can be considered as helpers, not really as *the* way > of building URIs. Building URIs from strings will be most common. Nice. I'll play around with it, time permitting. I'm on parental leave, so my daily schedule is highly dependent on the whims of my one-year-old :-) - Kim |
From: Glyn M. <gly...@gm...> - 2008-10-07 11:24:17
|
Hi, 2008/10/7 Kim Gräsman <kim...@gm...> > Hi Glyn, > > On Tue, Oct 7, 2008 at 12:12, Glyn Matthews <gly...@gm...> > wrote: > > > > I don't know if its worth the hassle of having a distinct class for each > > scheme. I was thinking about building URIs using directives in a similar > > way to what we have with messages: > > > > boost::network::uri uri; > > uri << scheme("http") > > << authority("www.boost.org") > > << path("path") > > << query("x=5") > > << fragment("bananas") > > ; > > It looks nice in a way, but I'm not sure how often you start with > components and want to join them into a URI? I think the usual use > case is you have a URI string and want to modify parts of it. But this > API would allow that too, I suppose. Yeah, you could always accept a string in the constructor arguments: boost::network::uri uri("http//www.boost.org/path?x=5#bananas"); Or: boost::network::uri uri("http//www.boost.org/path"); uri << query("x=5") << query("y=6"); Or: boost::network::uri boost_org("http//www.boost.org/"); boost::network uri; uri << boost_org << path("path") << query_param("x", 5); I think the directives can be considered as helpers, not really as *the* way of building URIs. Building URIs from strings will be most common. G |
From: K. G. <kim...@gm...> - 2008-10-07 10:58:12
|
Hi Glyn, On Tue, Oct 7, 2008 at 12:12, Glyn Matthews <gly...@gm...> wrote: > > I don't know if its worth the hassle of having a distinct class for each > scheme. I was thinking about building URIs using directives in a similar > way to what we have with messages: > > boost::network::uri uri; > uri << scheme("http") > << authority("www.boost.org") > << path("path") > << query("x=5") > << fragment("bananas") > ; It looks nice in a way, but I'm not sure how often you start with components and want to join them into a URI? I think the usual use case is you have a URI string and want to modify parts of it. But this API would allow that too, I suppose. > Is this too simplistic? Do you see any problems with this approach? Depending on the variance of URIs, though, this might not be simplistic enough :-) I think there may be enough format variance to justify a directive-based model, rather than just a simple data class, though. Interesting. - Kim |
From: Glyn M. <gly...@gm...> - 2008-10-07 10:23:08
|
Kim, 2008/10/7 Kim Gräsman <kim...@gm...> > I think I was having problems with the different shapes of different > types of URIs, and that each scheme should probably be represented by > its own class. I'm not sure, for example, what the HTTP client should > do if it's presented with an FTP URL. > I don't know if its worth the hassle of having a distinct class for each scheme. I was thinking about building URIs using directives in a similar way to what we have with messages: boost::network::uri uri; uri << scheme("http") << authority("www.boost.org") << path("path") << query("x=5") << fragment("bananas") ; boost::network::http::request request(uri); OR boost::network::http::request request(uri.string()); And for parsing: std::string scheme = boost::network::uri::scheme(uri); std::string authority = boost::network::uri::authority(uri); etc. Is this too simplistic? Do you see any problems with this approach? Glyn |
From: K. G. <kim...@gm...> - 2008-10-07 08:47:30
|
Hi Glyn, On Tue, Oct 7, 2008 at 10:19, Glyn Matthews <gly...@gm...> wrote: > >> For what it's worth, I've been experimenting with getting the uri >> separated out of the request, but the more I look at it, the less >> value I think it brings... > > Have you committed any code? Nope, not yet. > What do you mean by "less value"? IMO it > makes sense to separate the URI from the request, but I haven't given much > thought to the details. Looking at it again, maybe it isn't so bad :) I think I was having problems with the different shapes of different types of URIs, and that each scheme should probably be represented by its own class. I'm not sure, for example, what the HTTP client should do if it's presented with an FTP URL. And does it make sense to send a string to to the HTTP client? Maybe it should be a 'uri' or maybe it should be an 'http_uri'? > Is it just difficult to do or do you just not think > its worth it by design? I definitely think it's worth doing, I'm just not sure I can find a good abstraction at the moment, but we could start with a simple URI and move from there, I suppose. - Kim |
From: Glyn M. <gly...@gm...> - 2008-10-07 08:34:11
|
Kim, 2008/10/7 Kim Gräsman <kim...@gm...> > Hi guys, > > For what it's worth, I've been experimenting with getting the uri > separated out of the request, but the more I look at it, the less > value I think it brings... > Have you committed any code? What do you mean by "less value"? IMO it makes sense to separate the URI from the request, but I haven't given much thought to the details. Is it just difficult to do or do you just not think its worth it by design? Thanks, Glyn |
From: K. G. <kim...@gm...> - 2008-10-07 07:47:51
|
Hi guys, For what it's worth, I've been experimenting with getting the uri separated out of the request, but the more I look at it, the less value I think it brings... - Kim On Mon, Oct 6, 2008 at 10:46, Glyn Matthews <gly...@gm...> wrote: > Hi Divye, > > 2008/10/5 Divye Kapoor <div...@gm...> >> >> Sorry Everyone, >> Got busy in college work, so I've been out of touch. I have some free >> time this week. Can anyone tell me what work was remaining in the last >> release and if its complete, what's next on the agenda? > > Examples :) We could still do with some examples that demonstrate how to > specialize the message type (think std::wstring and unordered containers). > > If you're ambitious you could take a look at implementing other protocols > (FTP and SMTP might be useful and not too difficult). > > There's not so much of an agenda, but if you have time to contribute > something and you have a good idea, feel free to do so. I think Dean has > more ideas if you need help. > > I have a bit of free time today, I'm going to develop some Python utilities > to help manage releases. > > Regards, > Glyn |
From: Glyn M. <gly...@gm...> - 2008-10-06 08:47:27
|
Hi Divye, 2008/10/5 Divye Kapoor <div...@gm...> > Sorry Everyone, > Got busy in college work, so I've been out of touch. I have some free > time this week. Can anyone tell me what work was remaining in the last > release and if its complete, what's next on the agenda? > Examples :) We could still do with some examples that demonstrate how to specialize the message type (think std::wstring and unordered containers). If you're ambitious you could take a look at implementing other protocols (FTP and SMTP might be useful and not too difficult). There's not so much of an agenda, but if you have time to contribute something and you have a good idea, feel free to do so. I think Dean has more ideas if you need help. I have a bit of free time today, I'm going to develop some Python utilities to help manage releases. Regards, Glyn |
From: Divye K. <div...@gm...> - 2008-10-05 20:17:37
|
Sorry Everyone, Got busy in college work, so I've been out of touch. I have some free time this week. Can anyone tell me what work was remaining in the last release and if its complete, what's next on the agenda? Divye -- An idealist is one who, on noticing that a rose smells better than a cabbage, concludes that it will also make better soup. H. L. Mencken (1880 - 1956) My official web site: http://people.iitr.ernet.in/shp/061305/ Webmaster: http://www.drkapoorsclinic.com Blog: http://divyekapoor.blogspot.com |
From: Divye K. <div...@gm...> - 2008-09-24 07:16:30
|
Hello, On Wed, Sep 24, 2008 at 12:32 PM, Kim Gräsman <kim...@gm...> wrote: > Hello, > > On Wed, Sep 24, 2008 at 00:07, Dean Michael Berris > <mik...@gm...> wrote: > > > > localhost - - [24/Sep/2008 06:04:28] "POST /cgi-bin/echo_headers.py > > HTTP/1.0" 200 - > > Traceback (most recent call last): > > File > "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/echo_headers.py", > > line 17, in <module> > > hdrs = cgisupport.http_headers(os.environ.get('HTTP_ALL_HEADERS')) > > This is where I get the value HTTP_ALL_HEADERS from the env vars. > > > File > "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", > > line 11, in __init__ > > self.parse(header_str) > > File > "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", > > line 24, in parse > > self.headers = self.__parse_headers(header_str) > > File > "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", > > line 31, in __parse_headers > > lines = str.split('\n') > > AttributeError: 'NoneType' object has no attribute 'split' > > Apparently the object returned from there is not a string, maybe it's > just empty? > None type indicates that the env var was empty. > > Could you check that your http_test_server.http actually calls > http_test_server.py and not cgi_server.py? Oh! I see now, the C++ > facade is not correctly updated -- it checks whether > http_test_server.py exists, but executes cgi_server.py, in the Unix > case. I'll fix that and commit. > Thanks Kim. > > - Kim > > Divye -- An idealist is one who, on noticing that a rose smells better than a cabbage, concludes that it will also make better soup. H. L. Mencken (1880 - 1956) My official web site: http://people.iitr.ernet.in/shp/061305/ Webmaster: http://www.drkapoorsclinic.com Blog: http://divyekapoor.blogspot.com |
From: Divye K. <div...@gm...> - 2008-09-24 07:13:59
|
Hi Dean, On Wed, Sep 24, 2008 at 3:37 AM, Dean Michael Berris <mik...@gm... > wrote: > Yes, they do. Let me paste the log of the errors below: > > > <snip> > localhost - - [24/Sep/2008 06:04:28] "POST /cgi-bin/echo_headers.py > HTTP/1.0" 200 - > Traceback (most recent call last): > File > "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/echo_headers.py", > line 17, in <module> > hdrs = cgisupport.http_headers(os.environ.get('HTTP_ALL_HEADERS')) > File > "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", > line 11, in __init__ > self.parse(header_str) > File > "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", > line 24, in parse > self.headers = self.__parse_headers(header_str) > File > "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", > line 31, in __parse_headers > lines = str.split('\n') > AttributeError: 'NoneType' object has no attribute 'split' > localhost - - [24/Sep/2008 06:04:28] CGI script exit status 0x100 > > <snip> > This is a different set of errors than those faced by Glyn. This requires investigation, but unfortunately, my linux box is shot due to a driver issue. It will take me some time to check this out. :( > > >> > >> Can we fix this before I merge to trunk and release 0.3? > > > > Hopefully yes, > > > > Sounds promising. > > You don't encounter this problem in Linux? > Linux box down :( > > -- > Dean Michael C. Berris > Software Engineer, Friendster, Inc. > Divye -- An idealist is one who, on noticing that a rose smells better than a cabbage, concludes that it will also make better soup. H. L. Mencken (1880 - 1956) My official web site: http://people.iitr.ernet.in/shp/061305/ Webmaster: http://www.drkapoorsclinic.com Blog: http://divyekapoor.blogspot.com |
From: K. G. <kim...@gm...> - 2008-09-24 07:02:21
|
Hello, On Wed, Sep 24, 2008 at 00:07, Dean Michael Berris <mik...@gm...> wrote: > > localhost - - [24/Sep/2008 06:04:28] "POST /cgi-bin/echo_headers.py > HTTP/1.0" 200 - > Traceback (most recent call last): > File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/echo_headers.py", > line 17, in <module> > hdrs = cgisupport.http_headers(os.environ.get('HTTP_ALL_HEADERS')) This is where I get the value HTTP_ALL_HEADERS from the env vars. > File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", > line 11, in __init__ > self.parse(header_str) > File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", > line 24, in parse > self.headers = self.__parse_headers(header_str) > File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", > line 31, in __parse_headers > lines = str.split('\n') > AttributeError: 'NoneType' object has no attribute 'split' Apparently the object returned from there is not a string, maybe it's just empty? Could you check that your http_test_server.http actually calls http_test_server.py and not cgi_server.py? Oh! I see now, the C++ facade is not correctly updated -- it checks whether http_test_server.py exists, but executes cgi_server.py, in the Unix case. I'll fix that and commit. - Kim |
From: K. G. <kim...@gm...> - 2008-09-24 06:57:18
|
Hi Dean, On Wed, Sep 24, 2008 at 00:02, Dean Michael Berris <mik...@gm...> wrote: > On Tue, Sep 23, 2008 at 7:39 PM, Kim Gräsman <kim...@gm...> wrote: >> >> Can you test from a regular browser on Linux, and see whether you get >> any output at all from echo_headers.py? >> >> I wonder if it's a line-ending thing again. >> > > I don't see how this is relevant though, it works fine with > requestinfo.py -- why shouldn't it work in echo_headers and echo_body? I didn't mean the same line-ending issue as last time, but I figure the parsing of HTTP_ALL_HEADERS could be thrown if I made any Windows-specific assumptions about line endings. requestinfo.py doesn't use HTTP_ALL_HEADERS, so that's why it could differ... - Kim |
From: Allister L. S. <all...@gm...> - 2008-09-23 23:20:45
|
Hi, Just a quick comment on the errors... Yes, they do. Let me paste the log of the errors below: > > gcc.compile.c++ bin/gcc-4.2.3/debug/link-static/localhost_tests.o > gcc.link bin/gcc-4.2.3/debug/link-static/localhost_tests > testing.unit-test bin/gcc-4.2.3/debug/link-static/localhost_tests.passed > localhost - - [24/Sep/2008 06:04:28] "GET / HTTP/1.0" 200 - > localhost - - [24/Sep/2008 06:04:28] "GET / HTTP/1.0" 200 - > localhost - - [24/Sep/2008 06:04:28] "GET /boost.jpg HTTP/1.0" 200 - > localhost - - [24/Sep/2008 06:04:28] "GET /test.xml HTTP/1.0" 200 - > localhost - - [24/Sep/2008 06:04:28] "GET /test.xml HTTP/1.0" 200 - > localhost - - [24/Sep/2008 06:04:28] "GET /boost.jpg HTTP/1.0" 200 - > localhost - - [24/Sep/2008 06:04:28] "GET > /cgi-bin/requestinfo.py?query=1 HTTP/1.0" 200 - > localhost - - [24/Sep/2008 06:04:28] "GET > /cgi-bin/multiline-header.py?query=1 HTTP/1.0" 200 - > localhost - - [24/Sep/2008 06:04:28] code 404, message File not found > localhost - - [24/Sep/2008 06:04:28] "GET /file_not_found HTTP/1.0" 404 - > localhost - - [24/Sep/2008 06:04:28] "HEAD /test.xml HTTP/1.0" 200 - > localhost - - [24/Sep/2008 06:04:28] "POST /cgi-bin/echo_headers.py > HTTP/1.0" 200 - > Traceback (most recent call last): > File > "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/echo_headers.py", > line 17, in <module> > hdrs = cgisupport.http_headers(os.environ.get('HTTP_ALL_HEADERS')) > File > "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", > line 11, in __init__ > self.parse(header_str) > File > "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", > line 24, in parse > self.headers = self.__parse_headers(header_str) > File > "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", > line 31, in __parse_headers > lines = str.split('\n') > AttributeError: 'NoneType' object has no attribute 'split' Apparently, the parsing of the headers from HTTP_ALL_HEADERS is not yet perfect. I hope I can find time this week to improve cgisupport.py > localhost - - [24/Sep/2008 06:04:28] CGI script exit status 0x100 > Running 15 test cases... > localhost_tests.cpp(272): error in "post_with_explicit_headers": check > headers["content-length"] == content_length failed [ != 5] Obviously, HTTP_ALL_HEADERS does not give you the proper content length through this method. In fact, HTTP_ALL_HEADERS doesn't contain the string "content-length". But you can still get it with os.environ["CONTENT_LENGTH"]. > localhost_tests.cpp(273): error in "post_with_explicit_headers": check > headers["content-type"] == content_type failed [ != > application/x-www-form-urlencoded] Same with content length, use os.environ["CONTENT_TYPE"]. The rest of the errors are of the same type of error. So basically we'll need better parsing of headers in cgisupport.py. Basically, it would be best to try to understand how the parsing is done in CGIHTTPRequestHandler. There one will see that it's not as straightforward as splitting lines with colons as a line could contain more than one colon. I tried inserting these lines into http_test_server.py (line 20, at the beginning of run_cgi function): print '********DEBUG self.headers!!!' print self.headers print '********END DEBUG' The server's console output when I use Firefox to access the server is: ********DEBUG self.headers!!! Host: localhost:8000 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-gb,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive ********END DEBUG So, as we can see, Content-Type and Content-Length are obtained differently by CGIHTTPRequestHandler. It'd also help if one understands how the headers are parsed in $PYTHON_HOME/Lib/rfc822.py. Unfortunately, I'm rather pressed these days so maybe Kim or someone else can do the improvements based on these observations. Cheers, Allister |
From: Dean M. B. <mik...@gm...> - 2008-09-23 22:08:06
|
Hi Divye, On Wed, Sep 24, 2008 at 12:37 AM, Divye Kapoor <div...@gm...> wrote: > Hello Dean, > > On Tue, Sep 23, 2008 at 4:22 PM, Dean Michael Berris > <mik...@gm...> wrote: >> >> I've only now been able to run the localhost test scripts in Linux and >> after trying to remedy the situation on my own, I recognize that I >> don't have enough Python kung fu to deal with this. >> >> Apparently HTTP_ALL_HEADERS is not set when the echo_headers and >> echo_body script executes in Linux. > > Do all python scripts in the cgi-bin directory have execute permissions for > *all* users? I seem to remember that the linux version of CGIHTTPServer runs > the CGI scripts with a uid of nobody and that might create permission issues > in some cases. Also, are there any errors in the python log window? > Yes, they do. Let me paste the log of the errors below: gcc.compile.c++ bin/gcc-4.2.3/debug/link-static/localhost_tests.o gcc.link bin/gcc-4.2.3/debug/link-static/localhost_tests testing.unit-test bin/gcc-4.2.3/debug/link-static/localhost_tests.passed localhost - - [24/Sep/2008 06:04:28] "GET / HTTP/1.0" 200 - localhost - - [24/Sep/2008 06:04:28] "GET / HTTP/1.0" 200 - localhost - - [24/Sep/2008 06:04:28] "GET /boost.jpg HTTP/1.0" 200 - localhost - - [24/Sep/2008 06:04:28] "GET /test.xml HTTP/1.0" 200 - localhost - - [24/Sep/2008 06:04:28] "GET /test.xml HTTP/1.0" 200 - localhost - - [24/Sep/2008 06:04:28] "GET /boost.jpg HTTP/1.0" 200 - localhost - - [24/Sep/2008 06:04:28] "GET /cgi-bin/requestinfo.py?query=1 HTTP/1.0" 200 - localhost - - [24/Sep/2008 06:04:28] "GET /cgi-bin/multiline-header.py?query=1 HTTP/1.0" 200 - localhost - - [24/Sep/2008 06:04:28] code 404, message File not found localhost - - [24/Sep/2008 06:04:28] "GET /file_not_found HTTP/1.0" 404 - localhost - - [24/Sep/2008 06:04:28] "HEAD /test.xml HTTP/1.0" 200 - localhost - - [24/Sep/2008 06:04:28] "POST /cgi-bin/echo_headers.py HTTP/1.0" 200 - Traceback (most recent call last): File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/echo_headers.py", line 17, in <module> hdrs = cgisupport.http_headers(os.environ.get('HTTP_ALL_HEADERS')) File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", line 11, in __init__ self.parse(header_str) File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", line 24, in parse self.headers = self.__parse_headers(header_str) File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", line 31, in __parse_headers lines = str.split('\n') AttributeError: 'NoneType' object has no attribute 'split' localhost - - [24/Sep/2008 06:04:28] CGI script exit status 0x100 Running 15 test cases... localhost_tests.cpp(272): error in "post_with_explicit_headers": check headers["content-length"] == content_length failed [ != 5] localhost_tests.cpp(273): error in "post_with_explicit_headers": check headers["content-type"] == content_type failed [ != application/x-www-form-urlencoded] localhost - - [24/Sep/2008 06:04:28] "POST /cgi-bin/echo_headers.py HTTP/1.0" 200 - Traceback (most recent call last): File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/echo_headers.py", line 17, in <module> hdrs = cgisupport.http_headers(os.environ.get('HTTP_ALL_HEADERS')) File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", line 11, in __init__ self.parse(header_str) File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", line 24, in parse self.headers = self.__parse_headers(header_str) File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", line 31, in __parse_headers lines = str.split('\n') AttributeError: 'NoneType' object has no attribute 'split' localhost - - [24/Sep/2008 06:04:28] CGI script exit status 0x100 localhost_tests.cpp(290): error in "post_with_implicit_headers": check headers["content-length"] == get_content_length(postdata) failed [ != 5] localhost_tests.cpp(291): error in "post_with_implicit_headers": check headers["content-type"] == "x-application/octet-stream" failed [ != x-application/octet-stream] localhost - - [24/Sep/2008 06:04:28] "POST /cgi-bin/echo_headers.py HTTP/1.0" 200 - Traceback (most recent call last): File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/echo_headers.py", line 17, in <module> hdrs = cgisupport.http_headers(os.environ.get('HTTP_ALL_HEADERS')) File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", line 11, in __init__ self.parse(header_str) File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", line 24, in parse self.headers = self.__parse_headers(header_str) File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", line 31, in __parse_headers lines = str.split('\n') AttributeError: 'NoneType' object has no attribute 'split' localhost - - [24/Sep/2008 06:04:28] CGI script exit status 0x100 localhost_tests.cpp(309): error in "post_with_explicit_content_type": check headers["content-length"] == get_content_length(postdata) failed [ != 5] localhost_tests.cpp(310): error in "post_with_explicit_content_type": check headers["content-type"] == content_type failed [ != application/x-my-content-type] localhost - - [24/Sep/2008 06:04:28] "POST /cgi-bin/echo_body.py HTTP/1.0" 200 - localhost - - [24/Sep/2008 06:04:28] "POST /cgi-bin/echo_headers.py HTTP/1.0" 200 - Traceback (most recent call last): File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/echo_headers.py", line 17, in <module> hdrs = cgisupport.http_headers(os.environ.get('HTTP_ALL_HEADERS')) File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", line 11, in __init__ self.parse(header_str) File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", line 24, in parse self.headers = self.__parse_headers(header_str) File "/home/dean/Source/C++/cpp-netlib-http_integration/libs/network/test/server/cgi-bin/cgisupport.py", line 31, in __parse_headers lines = str.split('\n') AttributeError: 'NoneType' object has no attribute 'split' localhost - - [24/Sep/2008 06:04:28] CGI script exit status 0x100 localhost_tests.cpp(342): error in "post_with_custom_headers": check headers["x-cpp-netlib"] == "rocks!" failed [ != rocks!] *** 7 failures detected in test suite "http 1.0 localhost tests" LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH bin/gcc-4.2.3/debug/link-static/localhost_tests && touch bin/gcc-4.2.3/debug/link-static/localhost_tests.passed ...failed testing.unit-test bin/gcc-4.2.3/debug/link-static/localhost_tests.passed... ...failed updating 1 target... ...updated 2 targets... >> >> Can we fix this before I merge to trunk and release 0.3? > > Hopefully yes, > Sounds promising. You don't encounter this problem in Linux? -- Dean Michael C. Berris Software Engineer, Friendster, Inc. |
From: Dean M. B. <mik...@gm...> - 2008-09-23 22:02:45
|
Hi Kim, On Tue, Sep 23, 2008 at 7:39 PM, Kim Gräsman <kim...@gm...> wrote: > Hi Dean, > > On Tue, Sep 23, 2008 at 12:52, Dean Michael Berris > <mik...@gm...> wrote: >> >> Apparently HTTP_ALL_HEADERS is not set when the echo_headers and >> echo_body script executes in Linux. > > Can you test from a regular browser on Linux, and see whether you get > any output at all from echo_headers.py? > > I wonder if it's a line-ending thing again. > I don't see how this is relevant though, it works fine with requestinfo.py -- why shouldn't it work in echo_headers and echo_body? -- Dean Michael C. Berris Software Engineer, Friendster, Inc. |
From: Divye K. <div...@gm...> - 2008-09-23 21:05:12
|
On Wed, Sep 24, 2008 at 2:21 AM, Glyn Matthews <gly...@gm...>wrote: > Hi, > > 2008/9/23 Divye Kapoor <div...@gm...> > >> >> Do all python scripts in the cgi-bin directory have execute permissions >> for *all* users? I seem to remember that the linux version of CGIHTTPServer >> runs the CGI scripts with a uid of nobody and that might create permission >> issues in some cases. Also, are there any errors in the python log window? >> >> > > This is the trace I get: > <log snipped> > > > Traceback (most recent call last): > File "/usr/lib/python2.5/CGIHTTPServer.py", line 251, in run_cgi > os.execve(scriptfile, args, os.environ) > </log snipped> Permissions problem. Make sure that all cgi-bin scripts are world readable and world executable. Also, all directories in their path are world readable and executable. These scripts are accessed with a userid of "nobody" (uid usually ~65000) so the .py files have to be executable by the "others" permission group and the directory in which they are contained has to have permissions for "others" to access them. Basically you have to allow everybody to access them so that "nobody" can execute them. Rather a bad pun, I must say... :-) > > I think I missed why you're setting the HTTP_ALL_HEADERS environment > variable. How is this supposed to work? > HTTP_ALL_HEADERS is being set so that we can echo the headers back to the user in their raw form. The new http_server simply concatenates the headers received in the raw form into an env. variable before handing over processing to the python library's CGIHTTPServer. This env. variable is accessed in the echo_headers.py and echoed back to the client. > Glyn > > Hope that helped, Divye -- An idealist is one who, on noticing that a rose smells better than a cabbage, concludes that it will also make better soup. H. L. Mencken (1880 - 1956) My official web site: http://people.iitr.ernet.in/shp/061305/ Webmaster: http://www.drkapoorsclinic.com Blog: http://divyekapoor.blogspot.com |
From: Glyn M. <gly...@gm...> - 2008-09-23 20:51:48
|
Hi, 2008/9/23 Divye Kapoor <div...@gm...> > > Do all python scripts in the cgi-bin directory have execute permissions for > *all* users? I seem to remember that the linux version of CGIHTTPServer runs > the CGI scripts with a uid of nobody and that might create permission issues > in some cases. Also, are there any errors in the python log window? > > This is the trace I get: localhost - - [23/Sep/2008 22:30:38] "GET / HTTP/1.0" 200 - localhost - - [23/Sep/2008 22:30:38] "GET / HTTP/1.0" 200 - localhost - - [23/Sep/2008 22:30:38] "GET /boost.jpg HTTP/1.0" 200 - localhost - - [23/Sep/2008 22:30:38] "GET /test.xml HTTP/1.0" 200 - localhost - - [23/Sep/2008 22:30:38] "GET /test.xml HTTP/1.0" 200 - localhost - - [23/Sep/2008 22:30:38] "GET /boost.jpg HTTP/1.0" 200 - localhost - - [23/Sep/2008 22:30:38] "GET /cgi-bin/requestinfo.py?query=1 HTTP/1.0" 200 - localhost - - [23/Sep/2008 22:30:38] "GET /cgi-bin/multiline-header.py?query=1 HTTP/1.0" 200 - localhost - - [23/Sep/2008 22:30:38] code 404, message File not found localhost - - [23/Sep/2008 22:30:38] "GET /file_not_found HTTP/1.0" 404 - localhost - - [23/Sep/2008 22:30:38] "HEAD /test.xml HTTP/1.0" 200 - localhost - - [23/Sep/2008 22:30:38] "POST /cgi-bin/echo_headers.py HTTP/1.0" 200 - Traceback (most recent call last): File "/usr/lib/python2.5/CGIHTTPServer.py", line 251, in run_cgi os.execve(scriptfile, args, os.environ) OSError: [Errno 13] Permission denied localhost - - [23/Sep/2008 22:30:38] CGI script exit status 0x7f00 Running 15 test cases... libs/network/test/localhost_tests.cpp(269): fatal error in "post_with_explicit_headers": exception thrown by r = c.post(req) localhost - - [23/Sep/2008 22:30:38] "POST /cgi-bin/echo_headers.py HTTP/1.0" 200 - Traceback (most recent call last): File "/usr/lib/python2.5/CGIHTTPServer.py", line 251, in run_cgi os.execve(scriptfile, args, os.environ) OSError: [Errno 13] Permission denied localhost - - [23/Sep/2008 22:30:38] CGI script exit status 0x7f00 libs/network/test/localhost_tests.cpp(287): fatal error in "post_with_implicit_headers": exception thrown by r = c.post(req, postdata) localhost - - [23/Sep/2008 22:30:38] "POST /cgi-bin/echo_headers.py HTTP/1.0" 200 - Traceback (most recent call last): File "/usr/lib/python2.5/CGIHTTPServer.py", line 251, in run_cgi os.execve(scriptfile, args, os.environ) OSError: [Errno 13] Permission denied localhost - - [23/Sep/2008 22:30:38] CGI script exit status 0x7f00 libs/network/test/localhost_tests.cpp(306): fatal error in "post_with_explicit_content_type": exception thrown by r = c.post(req, content_type, postdata) localhost - - [23/Sep/2008 22:30:38] "POST /cgi-bin/echo_body.py HTTP/1.0" 200 - Traceback (most recent call last): File "/usr/lib/python2.5/CGIHTTPServer.py", line 251, in run_cgi os.execve(scriptfile, args, os.environ) OSError: [Errno 13] Permission denied localhost - - [23/Sep/2008 22:30:38] CGI script exit status 0x7f00 libs/network/test/localhost_tests.cpp(324): fatal error in "post_body_default_content_type": exception thrown by r = c.post(req, postdata) localhost - - [23/Sep/2008 22:30:38] "POST /cgi-bin/echo_headers.py HTTP/1.0" 200 - Traceback (most recent call last): File "/usr/lib/python2.5/CGIHTTPServer.py", line 251, in run_cgi os.execve(scriptfile, args, os.environ) OSError: [Errno 13] Permission denied localhost - - [23/Sep/2008 22:30:38] CGI script exit status 0x7f00 libs/network/test/localhost_tests.cpp(339): fatal error in "post_with_custom_headers": exception thrown by r = c.post(req, std::string()) I think I missed why you're setting the HTTP_ALL_HEADERS environment variable. How is this supposed to work? Glyn |
From: Divye K. <div...@gm...> - 2008-09-23 16:37:15
|
Hello Dean, On Tue, Sep 23, 2008 at 4:22 PM, Dean Michael Berris <mik...@gm... > wrote: > I've only now been able to run the localhost test scripts in Linux and > after trying to remedy the situation on my own, I recognize that I > don't have enough Python kung fu to deal with this. > > Apparently HTTP_ALL_HEADERS is not set when the echo_headers and > echo_body script executes in Linux. > Do all python scripts in the cgi-bin directory have execute permissions for *all* users? I seem to remember that the linux version of CGIHTTPServer runs the CGI scripts with a uid of nobody and that might create permission issues in some cases. Also, are there any errors in the python log window? > > Can we fix this before I merge to trunk and release 0.3? > Hopefully yes, HTH, Divye -- An idealist is one who, on noticing that a rose smells better than a cabbage, concludes that it will also make better soup. H. L. Mencken (1880 - 1956) My official web site: http://people.iitr.ernet.in/shp/061305/ Webmaster: http://www.drkapoorsclinic.com Blog: http://divyekapoor.blogspot.com |
From: K. G. <kim...@gm...> - 2008-09-23 11:39:18
|
Hi Dean, On Tue, Sep 23, 2008 at 12:52, Dean Michael Berris <mik...@gm...> wrote: > > Apparently HTTP_ALL_HEADERS is not set when the echo_headers and > echo_body script executes in Linux. Can you test from a regular browser on Linux, and see whether you get any output at all from echo_headers.py? I wonder if it's a line-ending thing again. - Kim |
From: Dean M. B. <mik...@gm...> - 2008-09-23 10:52:37
|
I've only now been able to run the localhost test scripts in Linux and after trying to remedy the situation on my own, I recognize that I don't have enough Python kung fu to deal with this. Apparently HTTP_ALL_HEADERS is not set when the echo_headers and echo_body script executes in Linux. Can we fix this before I merge to trunk and release 0.3? -- Dean Michael C. Berris Software Engineer, Friendster, Inc. |
From: Glyn M. <gly...@gm...> - 2008-09-16 04:39:57
|
Dean, 2008/9/16 Dean Michael Berris <mik...@gm...> > Hi Glyn, > > On Tue, Sep 16, 2008 at 2:39 AM, Glyn Matthews <gly...@gm...> > wrote: > >> > >> 2. There have been and updates to documentation that needs mention > > > > I haven't made any updates to the documentation. > > > > Okay, I think I have to make some changes to the discussion regarding > the HTTP client. The documentation should reflect the new constructor > options and new method added to the HTTP Client. OK. I'd like to add some further explanation about the design decision to use tags and directives (I intended to do this even before Kim brought it up on another thread), but I don't have time to do it this week and I'll leave it for 0.4. Regard, Glyn |