[Oberon] Strange problems with WinAOS and WebDAV

John Drake jmdrake_98 at yahoo.com
Sat Sep 6 00:19:28 CEST 2003

Hello all,

After taking a break from trying to get WebDAV to work
right under WinAOS I took another shot at it.  I'm
using the latest WebDAV build (WebDAV.1.0.0.Zip) and
the latest version of WinAOS (Version 1.03, although
for some reason it still says "1.02" in the log and
in the Distribution.Text file.  But I know I 
downloaded from the 1.03 link, and I did this twice
just to make sure).

Anyway on to the strange problem.  Before I could do
everything with WebDAV except download the file.  I
could create/delete folders, upload files ect.  Now
whenever I do the first step (deleting the old
Oberon locks up hard.  I traced the lock up to a
call to procedure WebHTTP.ParseReply().  

PROCEDURE ParseReply*(VAR in: AosIO.Reader; VAR
header: ResponseHeader; VAR res: LONGINT; log :
VAR s: ARRAY 32 OF CHAR; af: AdditionalField; 
  i :LONGINT; ch :CHAR;
  GetToken(in, s); GetVersion(s, header.maj,
  GetToken(in, s); i := 0; GetInt(i, s,
header.statuscode); in.Ln(header.reasonphrase);
  IF header.maj >= 1 THEN
      GetToken(in, s);
      Utilities.TrimRight(s, ":");
      IF s = "Server" THEN 
      ELSIF s = "Date" THEN 
      ELSIF s = "Content-Type" THEN 
        in.Char(ch); in.Ln(header.contenttype) 
      ELSIF s = "Content-Length" THEN 
        in.Char(ch); in.Ln(s); 
        Utilities.StrToInt(s, header.contentlength)
      ELSIF s = "Transfer-Encoding" THEN 
        in.Char(ch); in.Ln(header.transferencoding)
        NEW(af); COPY(s, af.key); in.Char(ch);  
        af.next := header.additionalFields;   
        header.additionalFields := af
    UNTIL (in.res # AosIO.Ok) OR in.EOLN();
    res := OK
    IF log # NIL THEN 
      log.String("Unsupported HTTP version :"); 
      log.Int(header.maj, 5); log.Exit 
    res := VersionNotSupported
END ParseReply;

Upon further inspection I traced the lock up to the

UNTIL (in.res # AosIO.Ok) OR in.EOLN();

Specifically the call to in.EOLN().

So then I looked up in.EOLN().  It checks for the
end of line by calls to in.Peek() to "look" at
the next charecter in the input stream to see if
it's an end-of-line charecter.  So why should
this be a problem?  I have no idea.  I did notice
that the lines:

      IF s = "Server" THEN 

position the input stream past an end of line
charecter.  (The call to in.Ln(header.server)
reads all of the charecter in the input stream
up to and including the end of line charecters).
But if there's nothing else past that, shouldn't
that simply return an in.res = EOF or something
rather than just hanging up?

Another wierd problem.  In the procedure
DCT.CheckIn there is the following

IF resHeader.statuscode # WebHTTP.MultiStatus THEN

This does not compile under the latest WinAOS because
WebHTTP.MultiStatus is not defined.  I changed this
to WebHTTP.OK just to get it to compile.  This
can't be the cause of my other problem though
because I haven't gotten to DCT.CheckIn yet.

I'm not sure what to do next.


John M. Drake

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

More information about the Oberon mailing list