From c5c03ac5563961cbcbcb2a1cc3e8963d0c49e154 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 8 May 2009 02:14:50 +0000 Subject: Fixes for non-ASCII platforms by David McCreedy --- tests/libtest/lib556.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests/libtest/lib556.c') diff --git a/tests/libtest/lib556.c b/tests/libtest/lib556.c index cb57f763b..1466e40c0 100644 --- a/tests/libtest/lib556.c +++ b/tests/libtest/lib556.c @@ -46,8 +46,16 @@ int test(char *URL) if(!res) { /* we are connected, now get a HTTP document the raw way */ - const char *request = "GET /556 HTTP/1.2\r\n" + const char *request = +#ifdef CURL_DOES_CONVERSIONS + /* ASCII representation with escape sequences for non-ASCII platforms */ + "\x47\x45\x54\x20\x2f\x35\x35\x36\x20\x48\x54\x54\x50\x2f\x31\x2e" + "\x32\x0d\x0a\x48\x6f\x73\x74\x3a\x20\x6e\x69\x6e\x6a\x61\x0d\x0a" + "\x0d\x0a"; +#else + "GET /556 HTTP/1.2\r\n" "Host: ninja\r\n\r\n"; +#endif size_t iolen; char buf[1024]; @@ -61,6 +69,10 @@ int test(char *URL) /* busy-read like crazy */ res = curl_easy_recv(curl, buf, 1024, &iolen); +#ifdef TPF + sleep(1); /* avoid ctl-10 dump */ +#endif + if(iolen) /* send received stuff to stdout */ write(STDOUT_FILENO, buf, iolen); -- cgit v1.2.3