WCAT 对所有请求都返回 400 错误请求?

发布于 2024-09-26 13:37:46 字数 2120 浏览 8 评论 0原文

我在 IIS 论坛上发布了此消息,但尚未得到回复。所以我想我会在这里尝试一下。

我之前使用的是 WCAT 5.2,效果很好。我正在尝试在本地计算机上运行客户端和服务器以及 IIS 7。由于某种原因,我请求的每个 url 状态始终为 400(错误请求)当我查看 htterr 日志时,原因是主机名???

来自 httperr 日志:

#Fields: 日期时间 c-ip c-port s-ip s-port cs-version cs-method cs-uri sc-status s-siteid s-reason s-queuename 2010-10-06 04:02:15 127.0.0.1 43252 127.0.0.1 80 HTTP/1.1 GET /ds/test.html 400 - 主机名 -

Exe 命令

wcat.wsf -terminate -run -t uad.ubr -f settings.ubr -singleip -x

设置。 ubr

settings
{

    clientfile     = "uad.ubr";
    server         = "localhost";
    clients        = 1;
    virtualclients = 10;

    counters
    {
        interval = 10;

        counter = "Processor(_Total)\\% Processor Time";
        counter = "Processor(_Total)\\% Privileged Time";
        counter = "Processor(_Total)\\% User Time";
        counter = "Processor(_Total)\\Interrupts/sec";

        counter = "Memory\\Available KBytes";

        counter = "Process(w3wp)\\Working Set";

        counter = "System\\Context Switches/sec";
        counter = "System\\System Calls/sec";

        counter = "Web Service(_Total)\\Bytes Received/sec" ; 
        counter = "Web Service(_Total)\\Bytes Sent/sec" ; 
        counter = "Web Service(_Total)\\Connection Attempts/sec" ; 
        counter = "Web Service(_Total)\\Get Requests/sec" ; 
    }

    registry
    {
        path = "System\\CurrentControlSet\\Control\\FileSystem";
        name = "NtfsDisableLastAccessUpdate";
        type = REG_DWORD;
    }

    registry
    {
        path = "System\\CurrentControlSet\\Services\\Tcpip\\Parameters";
        name = "SynAttackProtect";
        type = REG_DWORD;
    }
}

客户端文件 (uad.ubr)

scenario
{
    warmup      = 5;
    duration    = 10;
    cooldown    = 5;

    default
    {
        // HTTP1.1 request
        version = HTTP11;
    }

    transaction
    {
        id = "1";
        weight = 1;

        request
        {
            url = "/ds/test.html";
        }
    }
}

I posted this in the IIS forums but there has been no replies. So I thought I would try here.

I was using WCAT 5.2 before and that worked ok. I'm trying to run both the client and server and IIS 7 on my local machine. For some reason for every url I request the status is always 400 (bad request) When I look in the htterr logs the reason is says is Hostname???

From httperr log:

#Fields: date time c-ip c-port s-ip s-port cs-version cs-method cs-uri sc-status s-siteid s-reason s-queuename
2010-10-06 04:02:15 127.0.0.1 43252 127.0.0.1 80 HTTP/1.1 GET /ds/test.html 400 - Hostname -

Exe Command

wcat.wsf -terminate -run -t uad.ubr -f settings.ubr -singleip -x

Settings.ubr

settings
{

    clientfile     = "uad.ubr";
    server         = "localhost";
    clients        = 1;
    virtualclients = 10;

    counters
    {
        interval = 10;

        counter = "Processor(_Total)\\% Processor Time";
        counter = "Processor(_Total)\\% Privileged Time";
        counter = "Processor(_Total)\\% User Time";
        counter = "Processor(_Total)\\Interrupts/sec";

        counter = "Memory\\Available KBytes";

        counter = "Process(w3wp)\\Working Set";

        counter = "System\\Context Switches/sec";
        counter = "System\\System Calls/sec";

        counter = "Web Service(_Total)\\Bytes Received/sec" ; 
        counter = "Web Service(_Total)\\Bytes Sent/sec" ; 
        counter = "Web Service(_Total)\\Connection Attempts/sec" ; 
        counter = "Web Service(_Total)\\Get Requests/sec" ; 
    }

    registry
    {
        path = "System\\CurrentControlSet\\Control\\FileSystem";
        name = "NtfsDisableLastAccessUpdate";
        type = REG_DWORD;
    }

    registry
    {
        path = "System\\CurrentControlSet\\Services\\Tcpip\\Parameters";
        name = "SynAttackProtect";
        type = REG_DWORD;
    }
}

Client File (uad.ubr)

scenario
{
    warmup      = 5;
    duration    = 10;
    cooldown    = 5;

    default
    {
        // HTTP1.1 request
        version = HTTP11;
    }

    transaction
    {
        id = "1";
        weight = 1;

        request
        {
            url = "/ds/test.html";
        }
    }
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱她像谁 2024-10-03 13:37:46

服务器返回400错误请求,因为缺少一些标头信息,需要在请求元素中添加“Host”。

request
{         
        url = "/ds/test.html";

        setHeader
        {
            name = "Host";
            value = "127.0.0.1";
        }
}

The server returns a 400 bad request because some header information is missing, you need to add a "Host" to the request element.

request
{         
        url = "/ds/test.html";

        setHeader
        {
            name = "Host";
            value = "127.0.0.1";
        }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文