aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib556.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-05-08 02:14:50 +0000
committerYang Tse <yangsita@gmail.com>2009-05-08 02:14:50 +0000
commitc5c03ac5563961cbcbcb2a1cc3e8963d0c49e154 (patch)
treec013ab93163eb8640b52a0385b9d3a0c1706417b /tests/libtest/lib556.c
parent6ca321ca75c8f8ad6808bcfd786ad8e84c790aff (diff)
Fixes for non-ASCII platforms by David McCreedy
Diffstat (limited to 'tests/libtest/lib556.c')
-rw-r--r--tests/libtest/lib556.c14
1 files changed, 13 insertions, 1 deletions
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);