Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
4c3578dd
Commit
4c3578dd
authored
Nov 06, 2012
by
Davis King
Browse files
updated http example
parent
ca2188c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
examples/server_http_ex.cpp
examples/server_http_ex.cpp
+3
-2
No files found.
examples/server_http_ex.cpp
View file @
4c3578dd
...
@@ -41,6 +41,7 @@ class web_server : public server::http_1a_c
...
@@ -41,6 +41,7 @@ class web_server : public server::http_1a_c
sout
<<
"<br> path = "
<<
incoming
.
path
<<
endl
;
sout
<<
"<br> path = "
<<
incoming
.
path
<<
endl
;
sout
<<
"<br> request_type = "
<<
incoming
.
request_type
<<
endl
;
sout
<<
"<br> request_type = "
<<
incoming
.
request_type
<<
endl
;
sout
<<
"<br> content_type = "
<<
incoming
.
content_type
<<
endl
;
sout
<<
"<br> content_type = "
<<
incoming
.
content_type
<<
endl
;
sout
<<
"<br> protocol = "
<<
incoming
.
protocol
<<
endl
;
sout
<<
"<br> foreign_ip = "
<<
incoming
.
foreign_ip
<<
endl
;
sout
<<
"<br> foreign_ip = "
<<
incoming
.
foreign_ip
<<
endl
;
sout
<<
"<br> foreign_port = "
<<
incoming
.
foreign_port
<<
endl
;
sout
<<
"<br> foreign_port = "
<<
incoming
.
foreign_port
<<
endl
;
sout
<<
"<br> local_ip = "
<<
incoming
.
local_ip
<<
endl
;
sout
<<
"<br> local_ip = "
<<
incoming
.
local_ip
<<
endl
;
...
@@ -63,7 +64,7 @@ class web_server : public server::http_1a_c
...
@@ -63,7 +64,7 @@ class web_server : public server::http_1a_c
// Echo any cookies back to the client browser
// Echo any cookies back to the client browser
sout
<<
"<h2>Cookies
we
sent to the server</h2>"
;
sout
<<
"<h2>Cookies
the web browser
sent to the server</h2>"
;
for
(
key_value_map
::
const_iterator
ci
=
incoming
.
cookies
.
begin
();
ci
!=
incoming
.
cookies
.
end
();
++
ci
)
for
(
key_value_map
::
const_iterator
ci
=
incoming
.
cookies
.
begin
();
ci
!=
incoming
.
cookies
.
end
();
++
ci
)
{
{
sout
<<
"<br/>"
<<
ci
->
first
<<
" = "
<<
ci
->
second
<<
endl
;
sout
<<
"<br/>"
<<
ci
->
first
<<
" = "
<<
ci
->
second
<<
endl
;
...
@@ -71,7 +72,7 @@ class web_server : public server::http_1a_c
...
@@ -71,7 +72,7 @@ class web_server : public server::http_1a_c
sout
<<
"<br/><br/>"
;
sout
<<
"<br/><br/>"
;
sout
<<
"<h2>HTTP Headers
we
sent to the server</h2>"
;
sout
<<
"<h2>HTTP Headers
the web browser
sent to the server</h2>"
;
// Echo out all the HTTP headers we received from the client web browser
// Echo out all the HTTP headers we received from the client web browser
for
(
key_value_map
::
const_iterator
ci
=
incoming
.
headers
.
begin
();
ci
!=
incoming
.
headers
.
end
();
++
ci
)
for
(
key_value_map
::
const_iterator
ci
=
incoming
.
headers
.
begin
();
ci
!=
incoming
.
headers
.
end
();
++
ci
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment