Re: Envelope protocol not supported error in do_setup_profile

From: Eric Paynter (eric@arcticbears.com)
Date: Mon Nov 13 2000 - 13:22:50 EST


I've just installed a test2 and placed in it a fresh install of the 2.21
client code with the minimum modifications to make it work and I've narrowed
this down to a previous problem I was having with IO that I worked around.
It seems that my work around is breaking the do_setup_profile for some
reason.

Here's the background...

With my installation of perl, whenever I do a "print $fh $msg" or a
"read($fh, $buf, $len)..." or even a "while (<$fh>)", and $fh is a socket,
the script hangs. I've worked around this using sysread and syswrite, which
work fine. The problem is that they may require a little touch up to the
program logic. So, in this case, I've had to touch up OPS.pm...

I see one of two ways to make it work:
1. Fix perl and use the supplied OPS.pm
2. Figure out where my modified OPS.pm is screwing up the OpenSRS server and
fix that.

For those who may be able to help me fix perl, it's running under W2K SP1
and here is the output of perl -v:

*******************************
D:\>perl -v

This is perl, v5.6.0 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2000, Larry Wall

Binary build 618 provided by ActiveState Tool Corp.
http://www.ActiveState.com
Built 21:03:54 Sep 13 2000

Perl may be copied only under the terms of either the Artistic License or
the
GNU General Public License, which may be found in the Perl 5.0 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
*******************************

The diff between the supplied OPS.pm and my OPS.pm is:
*******************************
208,209c208
< # print $fh "Content-Length: $len", $CRLF, $CRLF;
< syswrite($fh, "Content-Length: $len$CRLF$CRLF", length("Content-Length:
$len$CRLF$CRLF"));

---
> print $fh "Content-Length: $len", $CRLF, $CRLF;
212,213c211
< # print $fh $msg;
< syswrite($fh, $msg, length($msg));
---
> print $fh $msg;
248,251c246
< while (1) {
< sysread($fh, $buf, 1);
< $line .= $buf;
< last if ($line =~ /$CRLF$CRLF$/);
---
> while (defined( $line = <$fh>)) {
253c248
< }
---
> last if $too_long;
255,256c250,251
< # get the length of the data buffer
< if ( not $len and $line =~ /^\s*Content-Length:\s+(\d+)\s*\r\n\r\n/i ) {
---
> # get the length of the data buffer
> if ( not $len and $line =~ /^\s*Content-Length:\s+(\d+)\s*\r\n/i ) {
258c253
< }
---
> }
259a255,256
> # wait till the empty line
> next unless $line eq $CRLF;
261,262c258,260
< # read( $fh, $buf, $len) == $len or $buf = undef;
< sysread( $fh, $buf, $len) == $len or $buf = undef;
---
> read( $fh, $buf, $len) == $len or $buf = undef;
> last;
> }
*******************************

I know this is a lot of stuff to wade through, but any help at all will be really appreciated. I'll be working on this all day until I get it working... We were supposed to go live with .ca yesterday and this is what's holding us back.

Thanks,

-Eric

------------------------------------------------------- arctic bears - the internet - your way. 50000 domain names were reserved today. was yours? domains from US$25/year, name resolution, mail hosting. http://www.arcticbears.com

----- Original Message ----- From: "Daniel Manley" <dmanley@tucows.com> To: <dev-list@opensrs.org> Sent: Monday, November 13, 2000 7:44 AM Subject: Re: Envelope protocol not supported error in do_setup_profile

> so that actual registration works but the do_setup_profile doesn't? What kind > of customizations have you done, if any? > > Dan > > Eric Paynter wrote: > > > Has anyone seen this error generated by do_setup_profile? I've searched the > > archives and found people getting it at the end of registration, but not > > this early. If I say "based on existing", I get this. If I say "new client", > > I go right through to the end and registration succeeds. This is with the > > 2.2 and 2.21 clients. Support says to check for custom variables and prefix > > with p_, but at this stage I have not yet introduced any of my own > > variables. The full text of the error is: > > > > Failed attempt: OPS Decode Error: Envelope Protocol Not Supported > > > > Thanks for any help at all! > > > > -Eric > > > > ------------------------------------------------------- > > arctic bears - the internet - your way. > > 50000 domain names were reserved today. was yours? > > domains from US$25/year, name resolution, mail hosting. > > http://www.arcticbears.com > >



This archive was generated by hypermail 2.1.3 : Tue Oct 19 2004 - 23:36:03 EDT