cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Suggestion: Standards violation warnings

From: Stenberg Björn <Bjorn.Stenberg_at_elema.siemens.se>
Date: Tue, 19 Dec 2000 10:41:31 +0100

Daniel Stenberg wrote:
> The parsers for various things are written
> to accept standard violations.

Yes, I know. But in those cases where the code takes special care to handle
servers/headers that violate standards, we should warn about it. I don't
want curl to become a "weblint" or anything like that, just to report the
quirks we already have code to find.

Here's one such place:

** highlevel.c~ Tue Nov 28 10:41:01 2000
--- highlevel.c Mon Dec 18 18:49:14 2000
***************
*** 670,675 ****
--- 670,678 ----
            char *pathsep;
            char *newest;
  
+ infof(data,"RFC 2068 violation: 'Location' URL is relative: %s",
+ data->newurl);
+
            /* protsep points to the start of the host name */
            protsep=strstr(data->url, "//");
            if(!protsep)

Here's another:

** cookie.c~ Fri Nov 10 09:09:03 2000
--- cookie.c Tue Dec 19 11:14:32 2000
***************
*** 151,156 ****
--- 151,157 ----
          }
          else {
            /* this is an "illegal" <what>=<this> pair */
+ infof(data,"RFC 2109 violation: 'Set-Cookie' header is
malformed: %s", ptr);
          }
        }
        else {

(Although infof() can't be called from cookie.c.)

/Björn
Received on 2000-12-19