X Tutup
Skip to content

Commit 7ba7e2a

Browse files
author
Sebastiano Merlino
committed
Changed a typo
1 parent d1eee35 commit 7ba7e2a

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ compiler: gcc
44
before_install:
55
- wget http://199.231.187.83/resources/libmicrohttpd-0.9.26.tar.gz
66
- tar -xvzf libmicrohttpd-0.9.26.tar.gz
7-
- cd libmicrohttpd-0.9.20
7+
- cd libmicrohttpd-0.9.26
88
- ./configure --prefix=/usr
99
- make
1010
- sudo make install

examples/Test.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ void Test::render_GET(const http_request& r, http_response** res)
3939
for(std::map<std::string, std::string, header_comparator>::const_iterator it = head.begin(); it != head.end(); ++it)
4040
cout << (*it).first << "-> " << (*it).second << endl;
4141
string pp = r.get_arg("prova"); */
42-
std::vector<std::string> topics;
43-
topics.push_back("prova");
44-
//return long_polling_receive_response("", 200, "", topics, 10, "keepalive\n");
42+
43+
/*
4544
cout << r.get_querystring() << endl;
4645
*res = new http_file_response("/home/etr/progs/libhttpserver/test/noimg.png", 200, "image/png");
46+
*/
47+
48+
std::vector<std::string> topics;
49+
topics.push_back("prova");
50+
*res = new long_polling_receive_response("", 200, "", topics, false, 10, "keepalive\n");
4751
}
4852

4953
void Test::render_POST(const http_request& r, http_response** res)
@@ -59,13 +63,17 @@ void Test::render_POST(const http_request& r, http_response** res)
5963
cout << vv[i] << endl;
6064
}
6165
return http_string_response("OK",200);*/
66+
67+
/*
6268
http_string_response* s = new http_string_response("OK",100);
6369
s->set_header(http_utils::http_header_location, "B");
6470
s->set_cookie("Ciccio", "Puppo");
6571
s->set_cookie("Peppe", "Puppo");
6672
cout << s->get_cookie("Ciccio") << endl;
6773
*res = s;
68-
// return long_polling_send_response("<script type=\"text/javascript\">alert(\"ciao\")</script>\n", "prova");
74+
*/
75+
76+
*res = new long_polling_send_response("hi!!!!\n", "prova");
6977
}
7078

7179
void Test2::render_GET(const http_request& r, http_response** res)

0 commit comments

Comments
 (0)
X Tutup