コード例 #1
0
ファイル: testAppweb.c プロジェクト: cwhis/appweb
bool bulkPost(MprTestGroup *gp, char *url, int size, int expectStatus)
{
    char    *post;
    int     i, j;
    bool    success;

    app->postData = post = (char*) mprAlloc(size + 1);
    tassert(post != 0);

    for (i = 0; i < size; i++) {
        if (i > 0) {
            fmt(&post[i], 10, "&%07d=", i / 64);
        } else {
            fmt(&post[i], 10, "%08d=", i / 64);
        }
        for (j = i + 9; j < (i + 63); j++) {
            post[j] = 'a';
        }
        post[j] = '\n';
        i = j;
    }
    post[i] = '\0';

    success = simplePost(gp, url, post, slen(post), expectStatus);
    tassert(success);
    app->postData = 0;
    return success;
}
コード例 #2
0
ファイル: llhttpnode.cpp プロジェクト: 9skunks/imprudence
// virtual
void LLHTTPNode::post(LLHTTPNode::ResponsePtr response, const LLSD& context, const LLSD& input) const
{
	try
	{
		response->result(simplePost(input));
	}
	catch (NotImplemented)
	{
		response->methodNotAllowed();
	}
}