兔子专栏

刘晓逸(liuxiaoyi666)的小地盘

刘晓逸ID:liuxiaoyi666
69128次访问,排名1423好友122人,关注者405
微软最有价值专家,asp,asp.net
liuxiaoyi666的文章
原创 51 篇
翻译 0 篇
转载 0 篇
评论 90 篇
最近评论
holiday1001:分析团队人员的兴趣点很重要, 用什么计算公式去分析呢?
coder_java:老师您好,我想请教如何在上传时验证服务器端文件是否已经存在,若存在弹出js提示是否覆盖,确定时,就覆盖已有的文件,取消就返回浏览状态,若有示例能否发到小弟email:pigdone@126.com, 谢谢!
loveblack123:好文
shada:很好
可惜要信赖一个庞大的msxml
有没有简单点的库呢
wellpie:兄弟,你这里有需要域名 空间,企业邮局 或者是服务器带宽租用的吗,我是厦门维派;
或者如果你有不少空间需求的话,可以考虑代理,搞点外快。
目前我们也在招收代理,
利润可以是4.5折 。
需要的朋友,可以直接联系我QQ 908267931
文章分类
收藏
    相册
    朋友
    lingll的专栏
    孟子E章
    我小弟寻斌
    殷鹏
    特种兵
    莫依
    虎子的blog
    超级笨狼
    陈锐新书
    龙的天空
    自己的其他blog
    博客园的blog
    存档
    软件项目交易
    订阅我的博客
    XML聚合  FeedSky
    订阅到鲜果
    订阅到Google
    订阅到抓虾
    订阅到BlogLines
    订阅到Yahoo
    订阅到GouGou
    订阅到飞鸽
    订阅到Rojo
    订阅到newsgator
    订阅到netvibes

    原创 isapi中的一个转向例子收藏

    新一篇: 用vc6操作xml以及xmldom的简单介绍 | 旧一篇: adox 的vbs类,提取表名,列名等

    DWORD CUrltest1Filter::OnUrlMap(CHttpFilterContext* pCtxt,
     PHTTP_FILTER_URL_MAP pMapInfo)
    {
     // TODO: React to this notification accordingly and
     // return the appropriate status code
     char buffer[1024];
     DWORD bufferSize=sizeof(buffer);
     pCtxt->GetServerVariable("SERVER_NAME", buffer, &bufferSize);
    //  if (strstr (pMapInfo->pszURL, "DoRedirect"))
      if (strstr (buffer, "localhost"))
       {
          CHAR szRedirect [256];
          // replace www.microsoft.com with desired server
          sprintf(szRedirect, "Location: http://%s\r\n\r\n", "www.microsoft.com");
          pCtxt->ServerSupportFunction ( SF_REQ_SEND_RESPONSE_HEADER,
                (LPVOID) "302 Redirect",
                (DWORD *) szRedirect,
                0 );
          // Print a message to the debug window
          ISAPITRACE1 ("Redirecting to: %s\n", szRedirect);
          // we are done with this request
          return SF_STATUS_REQ_FINISHED_KEEP_CONN;
       }
       // URL did not contain a DoRedirect string.

     return SF_STATUS_REQ_NEXT_NOTIFICATION;
    }

    不同于我上一篇isapi的写法用了 pCtxt->GetServerVariable("SERVER_NAME", buffer, &bufferSize);
    GetServerVariable其实与asp的Request.ServerVariable是一个例子,参考msdn中的

    ALL_HTTP All HTTP headers that were not already parsed into one of the above variables. These variables are of the form HTTP_<header field name>.
    AUTH_TYPE Contains the type of authentication used.  For example, if Basic authentication is used, the string will be "Basic". For Windows NT Challenge-response, it will be "NTLM". Other authentication schemes will have other strings. Because new authentication types can be added to Internet Server, it is not possible to list all possible strings. If the string is empty then no authentication is used.
    CONTENT_LENGTH The number of bytes which the script can expect to receive from the client.
    CONTENT_TYPE The content type of the information supplied in the body of a POST request.
    GATEWAY_INTERFACE The revision of the CGI specification to which this server complies. The current version is CGI/1.1.
    HTTP_ACCEPT Special case HTTP header. Values of the Accept: fields are concatenated, separated by ", ". For example, if the following lines are part of the HTTP header:
    accept: */*; q=0.1
    accept: text/html
    accept: image/jpeg
    

    then the HTTP_ACCEPT variable will have a value of:

    */*; q=0.1, text/html, image/jpeg
    PATH_INFO Additional path information, as given by the client. This comprises the trailing part of the URL after the script name but before the query string (if any).
    PATH_TRANSLATED This is the value of PATH_INFO, but with any virtual path name expanded into a directory specification.
    QUERY_STRING The information which follows the ? in the URL which referenced this script.
    REMOTE_ADDR The IP address of the client.
    REMOTE_HOST The hostname of the client.
    REMOTE_USER This contains the username supplied by the client and authenticated by the server.
    REQUEST_METHOD The HTTP request method.
    SCRIPT_NAME The name of the script program being executed.
    SERVER_NAME The server's hostname (or IP address) as it should appear in self-referencing URLs.
    SERVER_PORT The TCP/IP port on which the request was received.
    SERVER_PROTOCOL The name and version of the information retrieval protocol relating to this request. Normally HTTP/1.0.
    SERVER_SOFTWARE The name and version of the web server under which the CGI program is running.

     

    会发现其实都是一样的

    发表于 @ 2007年01月28日 22:54:00|评论(loading...)|编辑

    新一篇: 用vc6操作xml以及xmldom的简单介绍 | 旧一篇: adox 的vbs类,提取表名,列名等

    评论

    #superdullwolf 发表于2007-02-25 14:30:23  IP:
    兔子兄弟,我来捧场了!!
    发表评论  


    当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
    Csdn Blog version 3.1a
    Copyright © liuxiaoyi666