Roberto wrote:

Hi,

When running Squid as httpd_accel, AND taking care of SSL, i'd like to figure out at the httpd wether a request was done with or without SSL, so I would be able to do a redirect in certain conditions.

I figured this would be a way (hack):

acl Secure port 443
header_access Via deny Secure
header_replace Via SSL

If that would work, I could just read out the Via header in apache (which I don't use for anything anyway) to determine the (original) connection.

But it does not work. Is there any other way (preferrably by means of an ACL, so I can also configure caching behaviour)?

If I would assume that this is not possible (so far no reply), would it perhaps be possible to create a patch myself to put the originating port in the Via header?


I've tried putting this in http.c (I am really not a C programmer, I only do perl):

strVia = httpHeaderGetList(hdr_in, HDR_VIA);
snprintf(bbuf, BBUF_SZ, "%d", orig_request->port);
strListAdd(&strVia, bbuf, ',');
httpHeaderPutStr(hdr_out, HDR_VIA, strBuf(strVia));
stringClean(&strVia);

But that does not work either, since it always displays port 80, even in https requests on 443

My question again: is there any way, if possible through configuration, but if nessecary through a source code hack, to determine at the httpd_accellerated server wether a request came in through ssl or not?

Regards, Roberto



Reply via email to