Roxen.git/
server/
protocols/
http.pike
Branch:
Tag:
Non-build tags
All tags
No tags
1998-04-30
1998-04-30 16:17:32 by Henrik Grubbström (Grubba) <grubba@grubba.org>
5e5d6a48e69bfaec30388ac43e4367308ac02cf9 (
11
lines) (+
8
/-
3
)
[
Show
|
Annotate
]
Branch:
5.2
Fixed cookie-parsing bug.
Rev: server/protocols/http.pike:1.95
1:
// This is a roxen module. // Copyright © 1996 - 1998, Idonex AB.
-
constant cvs_version = "$Id: http.pike,v 1.
94
1998/04/
24
08
:
44
:
53
per
Exp $";
+
constant cvs_version = "$Id: http.pike,v 1.
95
1998/04/
30
16
:
17
:
32
grubba
Exp $";
// HTTP protocol module. #include <config.h> private inherit "roxenlib";
463:
case "cookie": /* This header is quite heavily parsed */ string c; misc->cookies = contents;
-
foreach(contents/";", c)
+
if (!sizeof(contents)) {
+
// Needed for the new Pike 0.6
+
break;
+
}
+
foreach(
((
contents/";"
) - ({""}))
, c)
{ string name, value;
-
while(c[0]==' ') c=c[1..];
+
while(
sizeof(
c
) && c
[0]==' ') c=c[1..];
if(sscanf(c, "%s=%s", name, value) == 2) { value=http_decode_string(value);