diff options
Diffstat (limited to 'linden/indra/test/lliohttpserver_tut.cpp')
-rw-r--r-- | linden/indra/test/lliohttpserver_tut.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
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 @@ | |||
5 | * | 5 | * |
6 | * Copyright (c) 2006-2007, Linden Research, Inc. | 6 | * Copyright (c) 2006-2007, Linden Research, Inc. |
7 | * | 7 | * |
8 | * Second Life Viewer Source Code | ||
8 | * The source code in this file ("Source Code") is provided by Linden Lab | 9 | * The source code in this file ("Source Code") is provided by Linden Lab |
9 | * to you under the terms of the GNU General Public License, version 2.0 | 10 | * to you under the terms of the GNU General Public License, version 2.0 |
10 | * ("GPL"), unless you have obtained a separate licensing agreement | 11 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -116,7 +117,7 @@ namespace tut | |||
116 | LLSD context; | 117 | LLSD context; |
117 | 118 | ||
118 | chain.push_back(LLIOPipe::ptr_t(injector)); | 119 | chain.push_back(LLIOPipe::ptr_t(injector)); |
119 | LLCreateHTTPPipe(chain, mRoot); | 120 | LLCreateHTTPPipe(chain, mRoot, LLSD()); |
120 | chain.push_back(LLIOPipe::ptr_t(extractor)); | 121 | chain.push_back(LLIOPipe::ptr_t(extractor)); |
121 | 122 | ||
122 | pump->addChain(chain, DEFAULT_CHAIN_EXPIRY_SECS); | 123 | pump->addChain(chain, DEFAULT_CHAIN_EXPIRY_SECS); |
@@ -297,6 +298,33 @@ namespace tut | |||
297 | ); | 298 | ); |
298 | } | 299 | } |
299 | 300 | ||
301 | template<> template<> | ||
302 | void HTTPServiceTestObject::test<7>() | ||
303 | { | ||
304 | // test large request | ||
305 | std::stringstream stream; | ||
306 | |||
307 | //U32 size = 36 * 1024 * 1024; | ||
308 | //U32 size = 36 * 1024; | ||
309 | //std::vector<char> data(size); | ||
310 | //memset(&(data[0]), '1', size); | ||
311 | //data[size - 1] = '\0'; | ||
312 | |||
313 | |||
314 | //std::string result = httpPOST("web/echo", &(data[0])); | ||
315 | |||
316 | stream << "<llsd><array>"; | ||
317 | for(U32 i = 0; i < 1000000; ++i) | ||
318 | { | ||
319 | stream << "<integer>42</integer>"; | ||
320 | } | ||
321 | stream << "</array></llsd>"; | ||
322 | llinfos << "HTTPServiceTestObject::test<7>" | ||
323 | << stream.str().length() << llendl; | ||
324 | std::string result = httpPOST("web/echo", stream.str()); | ||
325 | ensure_starts_with("large echo status", result, "HTTP/1.0 200 OK\r\n"); | ||
326 | } | ||
327 | |||
300 | /* TO DO: | 328 | /* TO DO: |
301 | test generation of not found and method not allowed errors | 329 | test generation of not found and method not allowed errors |
302 | */ | 330 | */ |