joes 2003/04/23 15:57:57
Modified: src apreq.c
t params.c
Log:
Fix typo in %uXXXX parser.
Revision Changes Path
1.16 +1 -1 httpd-apreq-2/src/apreq.c
Index: apreq.c
===================================================================
RCS file: /home/cvs/httpd-apreq-2/src/apreq.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- apreq.c 22 Apr 2003 03:57:55 -0000 1.15
+++ apreq.c 23 Apr 2003 22:57:55 -0000 1.16
@@ -280,7 +280,7 @@
digit *= 16;
digit += (what[2] >= 'A' ? ((what[2] & 0xdf) - 'A') + 10 : (what[2] -
'0'));
digit *= 16;
- digit += (what[3] >= 'A' ? ((what[1] & 0xdf) - 'A') + 10 : (what[3] -
'0'));
+ digit += (what[3] >= 'A' ? ((what[3] & 0xdf) - 'A') + 10 : (what[3] -
'0'));
#else /*APR_CHARSET_EBCDIC*/
char xstr[7];
1.3 +4 -2 httpd-apreq-2/t/params.c
Index: params.c
===================================================================
RCS file: /home/cvs/httpd-apreq-2/t/params.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- params.c 23 Apr 2003 20:42:50 -0000 1.2
+++ params.c 23 Apr 2003 22:57:57 -0000 1.3
@@ -62,9 +62,9 @@
static void request_make(CuTest *tc)
{
- r =
apreq_request(NULL,"a=1;quux=foo+bar&plus=%2B;okie=dokie;novalue1;novalue2=");
+ r =
apreq_request(NULL,"a=1;quux=foo+bar&plus=%2B;uplus=%U002b;okie=dokie;novalue1;novalue2=");
CuAssertPtrNotNull(tc, r);
- CuAssertIntEquals(tc,6, apreq_table_nelts(r->args));
+ CuAssertIntEquals(tc,7, apreq_table_nelts(r->args));
}
static void request_args_get(CuTest *tc)
@@ -77,6 +77,8 @@
CuAssertStrEquals(tc,"foo bar",val);
val = apreq_table_get(r->args,"plus");
+ CuAssertStrEquals(tc,"+",val);
+ val = apreq_table_get(r->args,"uplus");
CuAssertStrEquals(tc,"+",val);
val = apreq_table_get(r->args,"okie");
CuAssertStrEquals(tc,"dokie",val);