Re: How to validate a URL ?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jeremy (jboschen_at_)
Date: 03/24/04

  • Next message: ak: "Re: SysAllocString memleak"
    Date: Wed, 24 Mar 2004 17:35:00 -0500
    
    

    If you have control over what verbs the server software allows, then the
    most efficient method is to use the HTTP HEAD method to request headers,
    from which you can extract whatever information about the resource you
    require. To do this, use one of the various INet API's, WinINet, WinHTTP,
    ATL's HttpClient, etc. If you don't have control over the verbs, then most
    likely they're still being allowed as very few people change them.

    For info on the HEAD method, see:
        http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4

    - Jeremy

    "a.m.a" <amarcaurele@videotron.ca> wrote in message
    news:0qm8c.100609$9p2.2075469@weber.videotron.net...
    >
    > "CheckAbdoul" <checkabdoul at mvps dot org> wrote in message
    > news:%2307YUGREEHA.3064@tk2msftngp13.phx.gbl...
    > > You could probably use the IsValidURL() API from the Internet
    > > Development SDK.
    > >
    > > --
    > > Cheers
    > > Check Abdoul [VC++ MVP]
    > > -----------------------------------
    > >
    > > "a.m.a" <amarcaurele@videotron.ca> wrote in message
    > > news:CA08c.60227$9p2.1141759@weber.videotron.net...
    > > > Hi
    > > >
    > > > Whats the best way to find out if a URL is valid ?
    > > >
    > > > The method should validate if the path points to a file data
    > > > even if the path is not an absolute path name, ex ::
    > > > www.asd.com/cgi#q98we7q97
    >
    > Thanks, but i dont think that this method will check the remote data's
    > availability.
    > I need more then a URL syntax checker, i also need the method to check if
    > the
    > remote file exists. I have objects that downloads data using a
    > IBindStatusCallBack.
    > But i dont want to create these if the file does not exist.
    >
    >
    >
    >
    >
    >


  • Next message: ak: "Re: SysAllocString memleak"

    Relevant Pages

    • Re: Query: "tense trickery"
      ... and we control all memories. ... was like English except that verbs had no tenses, so that, e.g., "is" ... shegoda icheda niom na. ...
      (alt.usage.english)
    • Re: Updating verbs in the PropertyGrid
      ... The problem is ADDING verbs and REMOVING verbs ... > updated until after the control is deselected and reselected again. ... > control is still selected until after you deselect it and reselect it again. ...
      (microsoft.public.dotnet.framework.windowsforms.designtime)
    • Re: Updating verbs in the PropertyGrid
      ... The problem is ADDING verbs and REMOVING verbs ... updated until after the control is deselected and reselected again. ... P.S. - I've tried using the ISelectionService to deselect all controls and ... >> private void OnComponentChanged(object sender, ...
      (microsoft.public.dotnet.framework.windowsforms.designtime)
    • Re: Updating verbs in the PropertyGrid
      ... Thanks for the suggestion but I've tried the ISelectionService approach that ... I have been able to get ISelectionService to work. ... >> updated until after the control is deselected and reselected again. ... >> own array of verbs, different from the collection that is edited in the ...
      (microsoft.public.dotnet.framework.windowsforms.designtime)