locked
Isuue with PHTTP_FILTER_PREPROC_HEADERS object and transparant proxy RRS feed

  • Question

  • User-187960248 posted

     Hello,

    I am developing a Web filter plugin for ISA 2004 which uses the ISAPI to get the headers in a URL. right now the code looks like this

    ---------------------------------------------------------------- 

    PHTTP_FILTER_PREPROC_HEADERS pHeaders

    PHTTP_FILTER_CONTEXT pfc
     CHAR url[URL_BUFFER_SIZE];

    dwSize = sizeof(url);
        memset(url, '\0', dwSize);
        pHeaders->GetHeader(pfc, TEXT("url"), url, &dwSize);
        if ( *url == '\0' ) {
            strcpy_s(url, "-");
        }

     ------------------------------------------------------------------------

    The problem with the above code is if ISA is a  transparant proxy the url passed to the plugin looks like this url:someinfo\http:\\www.me.com\. For non transparant it is url:http:\\www.me.com.

    I Just need the  http:\\www.me.com part. I was wondering if there is any function in the API which extract it even when the format is of type url:someinfo\http:\\www.me.com\

     

    Tuesday, December 11, 2007 1:15 PM

Answers

  • User511787461 posted

    The behavior of the API on IIS and the behavior on ISA are probably very different - as evidenced by your example - IIS would never give you a url in that format.  So, even though the API is binary compatible and named the same, it is not the same API.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Tuesday, December 11, 2007 2:28 PM

All replies

  • User511787461 posted

    Sorry, this site and forum is for IIS related questions, I don't think you will find much information about ISA here.

    Tuesday, December 11, 2007 1:50 PM
  • User-187960248 posted

    Hi,

    I know its IIS forums but the ISAPI is used by IIS. The API is primarily used by IIS and has been adopted by ISA   

    Tuesday, December 11, 2007 2:15 PM
  • User511787461 posted

    The behavior of the API on IIS and the behavior on ISA are probably very different - as evidenced by your example - IIS would never give you a url in that format.  So, even though the API is binary compatible and named the same, it is not the same API.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Tuesday, December 11, 2007 2:28 PM
  • User-187960248 posted

     Sorry got my question wrong. The server does not pass the url as I specified. Instead the problem seems to be with the header information when configuring ISA as transparent proxy. The host name header seems to be missing and all i get from pHeaders->GetHeader(pfc, TEXT("url"), url, &dwSize); is the path and not the host name.

    I ve heard the header information is passed in two line when configering a server as transparant proxy.

     

    Can you help me how to extract the hostname if the server is configured as porxy

     

    Tuesday, December 11, 2007 3:52 PM