From b2afb8800bb033a04bb3ecdf0363068d56648ef1 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:54 -0500 Subject: Second Life viewer sources 1.15.0.2 --- linden/indra/test/lliohttpserver_tut.cpp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'linden/indra/test/lliohttpserver_tut.cpp') diff --git a/linden/indra/test/lliohttpserver_tut.cpp b/linden/indra/test/lliohttpserver_tut.cpp index 1cc94bb..0d914f2 100644 --- a/linden/indra/test/lliohttpserver_tut.cpp +++ b/linden/indra/test/lliohttpserver_tut.cpp @@ -5,6 +5,7 @@ * * Copyright (c) 2006-2007, Linden Research, Inc. * + * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 * ("GPL"), unless you have obtained a separate licensing agreement @@ -116,7 +117,7 @@ namespace tut LLSD context; chain.push_back(LLIOPipe::ptr_t(injector)); - LLCreateHTTPPipe(chain, mRoot); + LLCreateHTTPPipe(chain, mRoot, LLSD()); chain.push_back(LLIOPipe::ptr_t(extractor)); pump->addChain(chain, DEFAULT_CHAIN_EXPIRY_SECS); @@ -297,6 +298,33 @@ namespace tut ); } + template<> template<> + void HTTPServiceTestObject::test<7>() + { + // test large request + std::stringstream stream; + + //U32 size = 36 * 1024 * 1024; + //U32 size = 36 * 1024; + //std::vector data(size); + //memset(&(data[0]), '1', size); + //data[size - 1] = '\0'; + + + //std::string result = httpPOST("web/echo", &(data[0])); + + stream << ""; + for(U32 i = 0; i < 1000000; ++i) + { + stream << "42"; + } + stream << ""; + llinfos << "HTTPServiceTestObject::test<7>" + << stream.str().length() << llendl; + std::string result = httpPOST("web/echo", stream.str()); + ensure_starts_with("large echo status", result, "HTTP/1.0 200 OK\r\n"); + } + /* TO DO: test generation of not found and method not allowed errors */ -- cgit v1.1