In article <[EMAIL PROTECTED]>,
Donn Cave <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Ron Garret <[EMAIL PROTECTED]> wrote:
>
> > The answer is obvious: select is looking only at the underlying socket,
> > and not at the rfile buffers.
> >
> > So... is this a bug in select?
On Apr 23, 9:51 am, Ron Garret <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>
> > Twisted does this out of the box, for what it's worth.
>
> Thanks. I will look at that.
There is also asyncore in the standard library, which is a ve
In article <[EMAIL PROTECTED]>,
Ron Garret <[EMAIL PROTECTED]> wrote:
> The answer is obvious: select is looking only at the underlying socket,
> and not at the rfile buffers.
>
> So... is this a bug in select? Or a bug in my code?
Yes.
I don't see any specific followup to this point, but it
In article <[EMAIL PROTECTED]>,
Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> Twisted does this out of the box, for what it's worth.
Thanks. I will look at that.
rg
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Mon, 23 Apr 2007 04:33:22 -0300, Ron Garret <[EMAIL PROTECTED]>
> escribió:
>
> > I have not been able to find a proxy server that can proxy to unix
> > sockets, so I need to write my own. Conceptually its a v
On Mon, 23 Apr 2007 00:33:22 -0700, Ron Garret <[EMAIL PROTECTED]> wrote:
>In article <[EMAIL PROTECTED]>,
> Irmen de Jong <[EMAIL PROTECTED]> wrote:
>
>> Ron Garret wrote:
>> > I don't understand why socketserver calling select should matter. (And
>> > BTW, there are no calls to select in SocketS
En Mon, 23 Apr 2007 04:33:22 -0300, Ron Garret <[EMAIL PROTECTED]>
escribió:
> I have not been able to find a proxy server that can proxy to unix
> sockets, so I need to write my own. Conceptually its a very simple
> thing: read the first line of an HTTP request, parse it with a regexp to
> ext
In article <[EMAIL PROTECTED]>,
Irmen de Jong <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > I don't understand why socketserver calling select should matter. (And
> > BTW, there are no calls to select in SocketServer.py. I'm using
> > Python2.5.)
>
> You don't *need* a select at all.
Y
Ron Garret wrote:
> I don't understand why socketserver calling select should matter. (And
> BTW, there are no calls to select in SocketServer.py. I'm using
> Python2.5.)
You don't *need* a select at all.
Socketserver just blocks on accept() and dispatches a handler
on the new connection.
>>
In article <[EMAIL PROTECTED]>,
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> Well, on WinXP, Python 2.4, with
I should have specified: I'm running 2.5 on unix. (I've reproduced the
problem on both Linux and OS X.)
rg
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Ron Garret <[EMAIL PROTECTED]> wrote:
> The answer is obvious: select is looking only at the underlying socket,
> and not at the rfile buffers.
Here is conclusive proof that there's a bug in select:
from socket import *
from select import select
s=socket(AF_INET
On Sun, 22 Apr 2007 11:42:10 -0700, Ron Garret <[EMAIL PROTECTED]> wrote:
>I think I've figured out what's going on.
>
> [snip]
>
>As you can see, the select call shows input available for a while (five
>lines) and then shows no input available despite the fact that there is
>manifestly still input
I think I've figured out what's going on.
First, here's the smoking gun: I changed the code as follows:
class myHandler(StreamRequestHandler):
def handle(self):
print '>>>'
while 1:
sl = select([self.rfile],[],[],1)[0]
print sl
l = self.rfile.readline()
i
In article <[EMAIL PROTECTED]>,
Ron Garret <[EMAIL PROTECTED]> wrote:
> Here's my code. It's a teeny weeny little HTTP server. (I'm not really
> trying to reinvent the wheel here. What I'm really doing is writing a
> dispatching proxy server, but this is the shortest way to illustrate the
>
In article <[EMAIL PROTECTED]>,
Irmen de Jong <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > Here's my code. It's a teeny weeny little HTTP server. (I'm not really
> > trying to reinvent the wheel here. What I'm really doing is writing a
> > dispatching proxy server, but this is the shor
In article <[EMAIL PROTECTED]>,
Bjoern Schliessmann <[EMAIL PROTECTED]>
wrote:
> > The only difference I can discern is that the browser send \r\n
> > for end-of-line while telnet just sends \n.
...
> > But I don't see why that should make any difference.
>
> Easy. If you only accept "\r\n
Ron Garret wrote:
> Here's my code. It's a teeny weeny little HTTP server. (I'm not really
> trying to reinvent the wheel here. What I'm really doing is writing a
> dispatching proxy server, but this is the shortest way to illustrate the
> problem I'm having):
>
> from SocketServer import *
Ron Garret wrote:
> print>>self.wfile, 'HTTP/1.0 200 OK'
> print>>self.wfile, 'Content-type: text/plain'
> print>>self.wfile
> print>>self.wfile, 'foo'
> [...]
> If I telnet into this server and type in an HTTP request manually
> it works fine. But when I try to access this with a
Here's my code. It's a teeny weeny little HTTP server. (I'm not really
trying to reinvent the wheel here. What I'm really doing is writing a
dispatching proxy server, but this is the shortest way to illustrate the
problem I'm having):
from SocketServer import *
from socket import *
from sele
19 matches
Mail list logo