tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Brunner <ronnie.brun...@netcetera.ch>
Subject Re: -httpresponse not working for me ...
Date Mon, 30 Apr 2007 09:59:02 GMT
Hi guys

> I have the same problem with a 302 response.

I tracked down the problem. It was introduced, when Apache 2.2.1
started to be more picky about internal representation of status and
response line.

Please use the head version from SVN or apply the attached fix to
your 3.6.0b4 version. A list of other changes in HEAD vs. 3.6.0b4 can
be found here: 
  http://svn.apache.org/repos/asf/tcl/websh/trunk/CHANGES
and in detail here:
  http://svn.apache.org/repos/asf/tcl/websh/trunk/src/ChangeLog
 
hth
Ronnie


--- response_ap.c       (revision 533622)
+++ response_ap.c       (working copy)
@@ -69,6 +69,17 @@
                r->status_line = ap_pstrdup(r->pool, ++response);
 #else /* APACHE2 */
                r->status_line = (char *) apr_pstrdup(r->pool,
		++response);
+               /* as of Apache 2.2.1, r->status_line must be in line
with
+                  r->status, therefore r->status must be set too */
+               if (strlen(response) > 3) {
+                 /* status code must be 3 digit numeric, which is
supposed
+                    to be followed by a blank in the status line */
+                 char tmp = response[3];
+                 response[3] = 0;
+                 Tcl_GetInt(interp, response, &(r->status));
+                 response[3] = tmp;
+               }
+
 #endif /* APACHE2 */
        }
        assignIteratorToHashTable(responseObj->headers, &iterator);

-- 
Meet us at Jazoon'07: 24 - 28 June - http://jazoon.com

Ronnie Brunner | ronnie.brunner@netcetera.ch
phone +41 (0)44 247 79 79 | fax +41 (0)44 247 70 75
Netcetera AG | 8040 Z├╝rich | Switzerland | http://netcetera.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org


Mime
View raw message