httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pelikan Stephan" <S.Peli...@apa.at>
Subject endless loop in libapreq
Date Tue, 09 Sep 2003 08:18:37 GMT
Hi,

There is an endless loop if I call a request like

...?&test=1&test=2

You might say this should unbeautiful but I'm not the only one who build
web-apps on top of this server so I had to find a solution: I patched.

--- apache_request.c.orig       2003-09-09 09:11:45.000000000 +0200
+++ apache_request.c    2003-09-09 09:14:21.000000000 +0200
@@ -388,12 +388,13 @@

     while (*data && (val = my_urlword(r->pool, &data))) {
        const char *key = ap_getword(r->pool, &val, '=');
-
+       if (*val != '\0') {
        req_plustospace((char*)key);
        ap_unescape_url_u((char*)key);
        req_plustospace((char*)val);
        ap_unescape_url_u((char*)val);
        ap_table_add(req->parms, key, val);
+       }
     }

 }

I didn't have the time to find the real problem. This occures in
libapreq-1.01 to libapreq-1.2 on HP-UX and Linux (I don't use apreq2 at
the moment).

Stephan

Mime
View raw message