Re: Getting xml-rpc and w.bloggar to work
will <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 14 Aug 2003, Wari Wahab wrote: > > Like I said in the earlier mail, I tried a lot of things, even to > setting content-length to len(response) * 2, wait I get is a delayed > action from w.bloggar, and 1/2 of the time, the response will be > rejected, either with lots of tags not there at all, or missing last > character, even with flush() before and after the print. You should be setting the Content-Length to the exact length of what you're sending over. Doing theme and variations on this is kind of silly and could potentially cause other issues. Most clients use this number to figure out how many bytes they need to read off the stream. It's not a maximum length of bytes you might send. Also, you didn't say _what_ you tried in the earlier email. You only said that you tried stuff which isn't very specific. I've seen no diffs or patches or code segments or anything. So my understanding of what you're trying to do and what you're seeing for data is coming solely from your emails and some rough guessing on my part. > Other numbers I tried with len(response) is to +1, -1, +2, -2, +5, > removed the \n at the end of that print statement, removed print and > used sys.stdout.write() instead, even used time.sleep(5), and even with > that, you can see that w.bloggar waited for 5 seconds until the > connection is closed, but you still get corrupted results. > > The thing is, with putty's raw mode, I get everything, but with > telnet.exe, I get the response in full at half of the time, why? > telnet.exe should not even care about content-length. I would get > something like '</methodRes*&' at the end of the request (with > telnet.exe) and *& represents corrupted high ascii characters in place > of 'nc', even though ethereal says otherwise. > > And why don't I face any problem at all when I used python's xmlrpclib, > or when I used Jericho, all with the same failing xmlrpc.cgi, that > telnet.exe or w.bloggar seems to report. > > The problem is not unlike what I sometimes encounter between php(unix) > and IE together, although that does not involved corrupted bits. > > Really Will, I've tried so many options, and wasted time I really resent this for two reasons. First, you didn't say any of this in the previous emails so it's wholly unclear what data you're looking at when you're stating the conclusions you've come to. Second, none of this is wasted time if you're trying to solve the problem. Some problems take a while to solve. Some problems take multiple people to solve. I think your shotgun approach to solving it is severly lacking in good problem-solving methodology but as you write more, it's becoming clear to me that I have no clue what you're symptoms are anyhow. Corrupted results? I thought the issue was that the data wasn't getting sent across in some cases. It sounds like you're really frustrated with the problem and frustrated with me trying to help. But it's hardly fair to castigate me for asking questions trying to clarify what you're seeing. Abe's suggestion is probably fine (I think--I have no clue how -u is implemented because I haven't looked at the code), except that I think it's covering up the symptoms of the issue. I don't use xmlrpc. I have no clue how it works or how to set up an environment where I could test what you're going through. I do know that almost everything you've said so far is extremely fishy and I don't think it supports any of the conclusions you've arrived at other than "something is going wrong somewhere". I have a _lot_ of experience debugging problems with HTTP applications so I figured I'd try to help. Clearly I'm not helping at all, though, so I'll stop. Puzzled, /will -- whatever it is, you can find it at http://www.bluesock.org/~willg/ except Will--you can only see him in real life. ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01