« Previous Next »

Thread: How to normalize an url in native module

Last post 12-11-2008 8:52 AM by edigar. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 12-08-2008, 8:54 AM

    • edigar
    • Not Ranked
    • Joined on 11-27-2008, 6:50 AM
    • Posts 12

    How to normalize an url in native module

     Hi,

    with ISAPI filter, we could normalize an url using support function SF_REQ_NORMALIZE_URL.I would like to know how to normalize an url in native modules.

     

     

  • 12-08-2008, 4:12 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: How to normalize an url in native module

    Any url you receive from IIS should be normalized (unlike SF_NOTIFY_PRE_PROC filters in earlier IIS versions) and urls you provide to IIS (via SetUrl) will be normalized by IIS - what else do you need to normalize?

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 12-09-2008, 9:28 AM In reply to

    • edigar
    • Not Ranked
    • Joined on 11-27-2008, 6:50 AM
    • Posts 12

    Re: How to normalize an url in native module

    Thanks.I was not aware of it.

    I am trying to retrieve the URL in BeginRequest Notification by using

    IHttpRequest->GetHeader("URL",&length);

    But the length is always returned as ZERO.Please let me know if i am doing anything wrong

  • 12-09-2008, 4:18 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: How to normalize an url in native module

    url is not a header and the special header names from ISAPI filters do not exist for the native API interface any more.  You can get the url using IHttpRequest->GetRawHttpRequest()->CookedUrl.pAbsPath (and AbsPathLength).

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 12-11-2008, 8:52 AM In reply to

    • edigar
    • Not Ranked
    • Joined on 11-27-2008, 6:50 AM
    • Posts 12

    Re: How to normalize an url in native module

     Thanks a lot Anil.

Page 1 of 1 (5 items)
Microsoft Communities