Juergen Brendel wrote: > Hello! > > In my previous posting about the hanging client when POSTing to a WSGI > server with SSL, I said that it appears as if the client hasn't finished > its SSL exchange yet. > > However, some further debugging shows that the client actually sent off > its POST message body to the server (or at least, it thinks it has done > so). The client then is waiting for the actual response from the server. > > So, as far as the client and server are concerned, they both think the > SSL exchange has successfully completed. > > The client sent the message body and waits for the server, though, while > the server blocks on reading the message body from the socket. Nothing > ever seems to show up there...
Sorry I didn't reply before. I think we figured it out on IRC, but for the record: the problem was reading past the end of the socket with environ['wsgi.input'].read(). paste.httpserver protects against that case for http by not letting you read past the end of the socket, based on the value of Content-Length. If you don't send Content-Length, it assumes 0. For https this was disabled due to reported problems, but I'm not sure those problems are actually associated with the wrapper... I suspect it was a red herring. Per the discussion on IRC, it seems like you actually need to upload content of unknown length, which requires a client that does chunking. Then you can call environ['wsgi.input'].read(), and it'll read the entire body (issuing 100 Continue responses until it is read). At least, that's my impression from a quite read of the code, but there's also a comment in the code that says that is unimplemented. If it doesn't work, the CherryPy server should do chunked encoding. I'm a little unclear what environ['CONTENT_LENGTH'] will be in the case of a chunked request. Or even what it should be. -- Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org _______________________________________________ Paste-users mailing list [email protected] http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users
