pike.git/
src/
modules/
_Roxen/
roxen.c
Branch:
Tag:
Non-build tags
All tags
No tags
2000-08-14
2000-08-14 01:32:06 by David Hedbor <david@hedbor.org>
4a844935872cfb97de2b8a2fef09c9e1073be886 (
11
lines) (+
7
/-
4
)
[
Show
|
Annotate
]
Branch:
7.9
Patches from David Hedbor
Rev: src/modules/_Roxen/roxen.c:1.3
79:
return; }
-
push_
text
( pp ); // leftovers
+
push_
string
(
make_shared_binary_string(
pp
,
TPH->pnt - pp
)
)
; // leftovers
headers = allocate_mapping( 5 ); in = THP->headers; l = pp - THP->headers;
-
+
/* find first line here */ for( i = 0; i < l; i++ ) if( in[i] == '\n' )
97:
for(i = 0; i < l; i++) {
-
if( in[i] == ':' )
+
if(
in[j]
> 64 &&
in[
j] < 91) in[j]+=32;
+
else if( in[
i] == ':' )
{ /* in[os..i-1] == the header */
-
for(j=os;j<i;j++) if(in[j] > 63 && in[j] < 91) in[j]+=32;
+
push_string(make_shared_binary_string((char*)in+os,i-os)); os = i+1; while(in[os]==' ') os++;
131:
mapping_insert(headers, Pike_sp-2, Pike_sp-1); pop_n_elems(2); if( in[j+1] == '\n' ) j++;
-
os = i =
j+1
;
+
os =
j+1;
+
i =
j
;
} } push_mapping( headers );