132 lines
70 KiB
HTML
132 lines
70 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" dir="ltr"
|
|
xmlns:dc="http://purl.org/dc/terms/">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="generator" content="diff2html.py (http://git.droids-corp.org/gitweb/?p=diff2html)" />
|
|
<!--meta name="author" content="Fill in" /-->
|
|
<title>HTML Diff iostreams/http_client.cpp</title>
|
|
<link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAACVBMVEXAAAAAgAD///+K/HwIAAAAJUlEQVQI12NYBQQM2IgGBQ4mCIEQW7oyK4phampkGIQAc1G1AQCRxCNbyW92oQAAAABJRU5ErkJggg==" type="image/png" />
|
|
<meta property="dc:language" content="en" />
|
|
<!--meta property="dc:date" content="" /-->
|
|
<meta property="dc:modified" content="2023-07-30T17:02:08.834089+01:00" />
|
|
<meta name="description" content="File comparison" />
|
|
<meta property="dc:abstract" content="File comparison" />
|
|
<style>
|
|
table { border:0px; border-collapse:collapse; width: 100%; font-size:0.75em; font-family: Lucida Console, monospace }
|
|
td.line { color:#8080a0 }
|
|
th { background: black; color: white }
|
|
tr.diffunmodified td { background: #D0D0E0 }
|
|
tr.diffhunk td { background: #A0A0A0 }
|
|
tr.diffadded td { background: #CCFFCC }
|
|
tr.diffdeleted td { background: #FFCCCC }
|
|
tr.diffchanged td { background: #FFFFA0 }
|
|
span.diffchanged2 { background: #E0C880 }
|
|
span.diffponct { color: #B08080 }
|
|
tr.diffmisc td {}
|
|
tr.diffseparator td {}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<table class="diff">
|
|
<tr><th colspan='2'>src/​examples/​cpp03/​iostreams/​http_client.​cpp</th><th colspan='2'>src/​examples/​cpp11/​iostreams/​http_client.​cpp</th></tr>
|
|
<tr class="diffhunk"><td colspan="2">⋮</td><td colspan="2">⋮</td></tr><tr class="diffunmodified"><td class="diffline">1 </td><td class="diffpresent">/​/​</td><td class="diffline">1 </td><td class="diffpresent">/​/​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">2 </td><td class="diffpresent">/​/​<span class="diffponct">·</span>​http_client.​cpp</td><td class="diffline">2 </td><td class="diffpresent">/​/​<span class="diffponct">·</span>​http_client.​cpp</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">3 </td><td class="diffpresent">/​/​<span class="diffponct">·</span>​~~~~~~~~~~~~~~~</td><td class="diffline">3 </td><td class="diffpresent">/​/​<span class="diffponct">·</span>​~~~~~~~~~~~~~~~</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">4 </td><td class="diffpresent">/​/​</td><td class="diffline">4 </td><td class="diffpresent">/​/​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">5 </td><td class="diffpresent">/​/​<span class="diffponct">·</span>​Copyright<span class="diffponct">·</span>​(c)​<span class="diffponct">·</span>​2003-​2023<span class="diffponct">·</span>​Christopher<span class="diffponct">·</span>​M.​<span class="diffponct">·</span>​Kohlhoff<span class="diffponct">·</span>​(chris<span class="diffponct">·</span>​at<span class="diffponct">·</span>​kohlhoff<span class="diffponct">·</span>​dot<span class="diffponct">·</span>​com)​</td><td class="diffline">5 </td><td class="diffpresent">/​/​<span class="diffponct">·</span>​Copyright<span class="diffponct">·</span>​(c)​<span class="diffponct">·</span>​2003-​2023<span class="diffponct">·</span>​Christopher<span class="diffponct">·</span>​M.​<span class="diffponct">·</span>​Kohlhoff<span class="diffponct">·</span>​(chris<span class="diffponct">·</span>​at<span class="diffponct">·</span>​kohlhoff<span class="diffponct">·</span>​dot<span class="diffponct">·</span>​com)​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">6 </td><td class="diffpresent">/​/​</td><td class="diffline">6 </td><td class="diffpresent">/​/​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">7 </td><td class="diffpresent">/​/​<span class="diffponct">·</span>​Distributed<span class="diffponct">·</span>​under<span class="diffponct">·</span>​the<span class="diffponct">·</span>​Boost<span class="diffponct">·</span>​Software<span class="diffponct">·</span>​License,​<span class="diffponct">·</span>​Version<span class="diffponct">·</span>​1.​0.​<span class="diffponct">·</span>​(See<span class="diffponct">·</span>​accompanying</td><td class="diffline">7 </td><td class="diffpresent">/​/​<span class="diffponct">·</span>​Distributed<span class="diffponct">·</span>​under<span class="diffponct">·</span>​the<span class="diffponct">·</span>​Boost<span class="diffponct">·</span>​Software<span class="diffponct">·</span>​License,​<span class="diffponct">·</span>​Version<span class="diffponct">·</span>​1.​0.​<span class="diffponct">·</span>​(See<span class="diffponct">·</span>​accompanying</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">8 </td><td class="diffpresent">/​/​<span class="diffponct">·</span>​file<span class="diffponct">·</span>​LICENSE_1_0.​txt<span class="diffponct">·</span>​or<span class="diffponct">·</span>​copy<span class="diffponct">·</span>​at<span class="diffponct">·</span>​http:​/​/​www.​boost.​org/​LICENSE_1_0.​txt)​</td><td class="diffline">8 </td><td class="diffpresent">/​/​<span class="diffponct">·</span>​file<span class="diffponct">·</span>​LICENSE_1_0.​txt<span class="diffponct">·</span>​or<span class="diffponct">·</span>​copy<span class="diffponct">·</span>​at<span class="diffponct">·</span>​http:​/​/​www.​boost.​org/​LICENSE_1_0.​txt)​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">9 </td><td class="diffpresent">/​/​</td><td class="diffline">9 </td><td class="diffpresent">/​/​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">10 </td><td class="diffpresent"></td><td class="diffline">10 </td><td class="diffpresent"></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">11 </td><td class="diffpresent">#include<span class="diffponct">·</span>​<iostream></td><td class="diffline">11 </td><td class="diffpresent">#include<span class="diffponct">·</span>​<iostream></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">12 </td><td class="diffpresent">#include<span class="diffponct">·</span>​<istream></td><td class="diffline">12 </td><td class="diffpresent">#include<span class="diffponct">·</span>​<istream></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">13 </td><td class="diffpresent">#include<span class="diffponct">·</span>​<ostream></td><td class="diffline">13 </td><td class="diffpresent">#include<span class="diffponct">·</span>​<ostream></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">14 </td><td class="diffpresent">#include<span class="diffponct">·</span>​<string></td><td class="diffline">14 </td><td class="diffpresent">#include<span class="diffponct">·</span>​<string></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">15 </td><td class="diffpresent">#include<span class="diffponct">·</span>​<asio/​ip/​tcp.​hpp></td><td class="diffline">15 </td><td class="diffpresent">#include<span class="diffponct">·</span>​<asio/​ip/​tcp.​hpp></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">16 </td><td class="diffpresent"></td><td class="diffline">16 </td><td class="diffpresent"></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">17 </td><td class="diffpresent">using<span class="diffponct">·</span>​asio:​:​ip:​:​tcp;​</td><td class="diffline">17 </td><td class="diffpresent">using<span class="diffponct">·</span>​asio:​:​ip:​:​tcp;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">18 </td><td class="diffpresent"></td><td class="diffline">18 </td><td class="diffpresent"></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">19 </td><td class="diffpresent">int<span class="diffponct">·</span>​main(int<span class="diffponct">·</span>​argc,​<span class="diffponct">·</span>​char*<span class="diffponct">·</span>​argv[])​</td><td class="diffline">19 </td><td class="diffpresent">int<span class="diffponct">·</span>​main(int<span class="diffponct">·</span>​argc,​<span class="diffponct">·</span>​char*<span class="diffponct">·</span>​argv[])​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">20 </td><td class="diffpresent">{</td><td class="diffline">20 </td><td class="diffpresent">{</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">21 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​try</td><td class="diffline">21 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​try</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">22 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​{</td><td class="diffline">22 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​{</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">23 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​if<span class="diffponct">·</span>​(argc<span class="diffponct">·</span>​!=<span class="diffponct">·</span>​3)​</td><td class="diffline">23 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​if<span class="diffponct">·</span>​(argc<span class="diffponct">·</span>​!=<span class="diffponct">·</span>​3)​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">24 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​{</td><td class="diffline">24 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​{</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">25 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Usage:​<span class="diffponct">·</span>​http_client<span class="diffponct">·</span>​<server><span class="diffponct">·</span>​<path>\n";​</td><td class="diffline">25 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Usage:​<span class="diffponct">·</span>​http_client<span class="diffponct">·</span>​<server><span class="diffponct">·</span>​<path>\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">26 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Example:​\n";​</td><td class="diffline">26 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Example:​\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">27 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"<span class="diffponct">·</span>​<span class="diffponct">·</span>​http_client<span class="diffponct">·</span>​www.​boost.​org<span class="diffponct">·</span>​/​LICENSE_1_0.​txt\n";​</td><td class="diffline">27 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"<span class="diffponct">·</span>​<span class="diffponct">·</span>​http_client<span class="diffponct">·</span>​www.​boost.​org<span class="diffponct">·</span>​/​LICENSE_1_0.​txt\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">28 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​return<span class="diffponct">·</span>​1;​</td><td class="diffline">28 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​return<span class="diffponct">·</span>​1;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">29 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​}</td><td class="diffline">29 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​}</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">30 </td><td class="diffpresent"></td><td class="diffline">30 </td><td class="diffpresent"></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">31 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​asio:​:​ip:​:​tcp:​:​iostream<span class="diffponct">·</span>​s;​</td><td class="diffline">31 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​asio:​:​ip:​:​tcp:​:​iostream<span class="diffponct">·</span>​s;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">32 </td><td class="diffpresent"></td><td class="diffline">32 </td><td class="diffpresent"></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">33 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​The<span class="diffponct">·</span>​entire<span class="diffponct">·</span>​sequence<span class="diffponct">·</span>​of<span class="diffponct">·</span>​I/​O<span class="diffponct">·</span>​operations<span class="diffponct">·</span>​must<span class="diffponct">·</span>​complete<span class="diffponct">·</span>​within<span class="diffponct">·</span>​60<span class="diffponct">·</span>​seconds.​</td><td class="diffline">33 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​The<span class="diffponct">·</span>​entire<span class="diffponct">·</span>​sequence<span class="diffponct">·</span>​of<span class="diffponct">·</span>​I/​O<span class="diffponct">·</span>​operations<span class="diffponct">·</span>​must<span class="diffponct">·</span>​complete<span class="diffponct">·</span>​within<span class="diffponct">·</span>​60<span class="diffponct">·</span>​seconds.​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">34 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​If<span class="diffponct">·</span>​an<span class="diffponct">·</span>​expiry<span class="diffponct">·</span>​occurs,​<span class="diffponct">·</span>​the<span class="diffponct">·</span>​socket<span class="diffponct">·</span>​is<span class="diffponct">·</span>​automatically<span class="diffponct">·</span>​closed<span class="diffponct">·</span>​and<span class="diffponct">·</span>​the<span class="diffponct">·</span>​stream</td><td class="diffline">34 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​If<span class="diffponct">·</span>​an<span class="diffponct">·</span>​expiry<span class="diffponct">·</span>​occurs,​<span class="diffponct">·</span>​the<span class="diffponct">·</span>​socket<span class="diffponct">·</span>​is<span class="diffponct">·</span>​automatically<span class="diffponct">·</span>​closed<span class="diffponct">·</span>​and<span class="diffponct">·</span>​the<span class="diffponct">·</span>​stream</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">35 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​becomes<span class="diffponct">·</span>​bad.​</td><td class="diffline">35 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​becomes<span class="diffponct">·</span>​bad.​</td></tr>
|
|
<tr class="diffchanged"><td class="diffline">36 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s.​expires_after(<span class="diffchanged2">a</span>s<span class="diffchanged2">i</span><span class="diffchanged2">o</span>:​:​chrono:​:​seconds(60)​)​;​</td><td class="diffline">36 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s.​expires_after(s<span class="diffchanged2">t</span><span class="diffchanged2">d</span>:​:​chrono:​:​seconds(60)​)​;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">37 </td><td class="diffpresent"></td><td class="diffline">37 </td><td class="diffpresent"></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">38 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​Establish<span class="diffponct">·</span>​a<span class="diffponct">·</span>​connection<span class="diffponct">·</span>​to<span class="diffponct">·</span>​the<span class="diffponct">·</span>​server.​</td><td class="diffline">38 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​Establish<span class="diffponct">·</span>​a<span class="diffponct">·</span>​connection<span class="diffponct">·</span>​to<span class="diffponct">·</span>​the<span class="diffponct">·</span>​server.​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">39 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s.​connect(argv[1],​<span class="diffponct">·</span>​"http")​;​</td><td class="diffline">39 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s.​connect(argv[1],​<span class="diffponct">·</span>​"http")​;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">40 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​if<span class="diffponct">·</span>​(!s)​</td><td class="diffline">40 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​if<span class="diffponct">·</span>​(!s)​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">41 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​{</td><td class="diffline">41 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​{</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">42 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Unable<span class="diffponct">·</span>​to<span class="diffponct">·</span>​connect:​<span class="diffponct">·</span>​"<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​s.​error()​.​message()​<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"\n";​</td><td class="diffline">42 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Unable<span class="diffponct">·</span>​to<span class="diffponct">·</span>​connect:​<span class="diffponct">·</span>​"<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​s.​error()​.​message()​<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">43 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​return<span class="diffponct">·</span>​1;​</td><td class="diffline">43 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​return<span class="diffponct">·</span>​1;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">44 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​}</td><td class="diffline">44 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​}</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">45 </td><td class="diffpresent"></td><td class="diffline">45 </td><td class="diffpresent"></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">46 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​Send<span class="diffponct">·</span>​the<span class="diffponct">·</span>​request.​<span class="diffponct">·</span>​We<span class="diffponct">·</span>​specify<span class="diffponct">·</span>​the<span class="diffponct">·</span>​"Connection:​<span class="diffponct">·</span>​close"<span class="diffponct">·</span>​header<span class="diffponct">·</span>​so<span class="diffponct">·</span>​that<span class="diffponct">·</span>​the</td><td class="diffline">46 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​Send<span class="diffponct">·</span>​the<span class="diffponct">·</span>​request.​<span class="diffponct">·</span>​We<span class="diffponct">·</span>​specify<span class="diffponct">·</span>​the<span class="diffponct">·</span>​"Connection:​<span class="diffponct">·</span>​close"<span class="diffponct">·</span>​header<span class="diffponct">·</span>​so<span class="diffponct">·</span>​that<span class="diffponct">·</span>​the</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">47 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​server<span class="diffponct">·</span>​will<span class="diffponct">·</span>​close<span class="diffponct">·</span>​the<span class="diffponct">·</span>​socket<span class="diffponct">·</span>​after<span class="diffponct">·</span>​transmitting<span class="diffponct">·</span>​the<span class="diffponct">·</span>​response.​<span class="diffponct">·</span>​This<span class="diffponct">·</span>​will</td><td class="diffline">47 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​server<span class="diffponct">·</span>​will<span class="diffponct">·</span>​close<span class="diffponct">·</span>​the<span class="diffponct">·</span>​socket<span class="diffponct">·</span>​after<span class="diffponct">·</span>​transmitting<span class="diffponct">·</span>​the<span class="diffponct">·</span>​response.​<span class="diffponct">·</span>​This<span class="diffponct">·</span>​will</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">48 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​allow<span class="diffponct">·</span>​us<span class="diffponct">·</span>​to<span class="diffponct">·</span>​treat<span class="diffponct">·</span>​all<span class="diffponct">·</span>​data<span class="diffponct">·</span>​up<span class="diffponct">·</span>​until<span class="diffponct">·</span>​the<span class="diffponct">·</span>​EOF<span class="diffponct">·</span>​as<span class="diffponct">·</span>​the<span class="diffponct">·</span>​content.​</td><td class="diffline">48 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​allow<span class="diffponct">·</span>​us<span class="diffponct">·</span>​to<span class="diffponct">·</span>​treat<span class="diffponct">·</span>​all<span class="diffponct">·</span>​data<span class="diffponct">·</span>​up<span class="diffponct">·</span>​until<span class="diffponct">·</span>​the<span class="diffponct">·</span>​EOF<span class="diffponct">·</span>​as<span class="diffponct">·</span>​the<span class="diffponct">·</span>​content.​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">49 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"GET<span class="diffponct">·</span>​"<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​argv[2]<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"<span class="diffponct">·</span>​HTTP/​1.​0\r\n";​</td><td class="diffline">49 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"GET<span class="diffponct">·</span>​"<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​argv[2]<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"<span class="diffponct">·</span>​HTTP/​1.​0\r\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">50 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Host:​<span class="diffponct">·</span>​"<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​argv[1]<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"\r\n";​</td><td class="diffline">50 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Host:​<span class="diffponct">·</span>​"<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​argv[1]<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"\r\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">51 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Accept:​<span class="diffponct">·</span>​*/​*\r\n";​</td><td class="diffline">51 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Accept:​<span class="diffponct">·</span>​*/​*\r\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">52 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Connection:​<span class="diffponct">·</span>​close\r\n\r\n";​</td><td class="diffline">52 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Connection:​<span class="diffponct">·</span>​close\r\n\r\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">53 </td><td class="diffpresent"></td><td class="diffline">53 </td><td class="diffpresent"></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">54 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​By<span class="diffponct">·</span>​default,​<span class="diffponct">·</span>​the<span class="diffponct">·</span>​stream<span class="diffponct">·</span>​is<span class="diffponct">·</span>​tied<span class="diffponct">·</span>​with<span class="diffponct">·</span>​itself.​<span class="diffponct">·</span>​This<span class="diffponct">·</span>​means<span class="diffponct">·</span>​that<span class="diffponct">·</span>​the<span class="diffponct">·</span>​stream</td><td class="diffline">54 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​By<span class="diffponct">·</span>​default,​<span class="diffponct">·</span>​the<span class="diffponct">·</span>​stream<span class="diffponct">·</span>​is<span class="diffponct">·</span>​tied<span class="diffponct">·</span>​with<span class="diffponct">·</span>​itself.​<span class="diffponct">·</span>​This<span class="diffponct">·</span>​means<span class="diffponct">·</span>​that<span class="diffponct">·</span>​the<span class="diffponct">·</span>​stream</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">55 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​automatically<span class="diffponct">·</span>​flush<span class="diffponct">·</span>​the<span class="diffponct">·</span>​buffered<span class="diffponct">·</span>​output<span class="diffponct">·</span>​before<span class="diffponct">·</span>​attempting<span class="diffponct">·</span>​a<span class="diffponct">·</span>​read.​<span class="diffponct">·</span>​It<span class="diffponct">·</span>​is</td><td class="diffline">55 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​automatically<span class="diffponct">·</span>​flush<span class="diffponct">·</span>​the<span class="diffponct">·</span>​buffered<span class="diffponct">·</span>​output<span class="diffponct">·</span>​before<span class="diffponct">·</span>​attempting<span class="diffponct">·</span>​a<span class="diffponct">·</span>​read.​<span class="diffponct">·</span>​It<span class="diffponct">·</span>​is</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">56 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​not<span class="diffponct">·</span>​necessary<span class="diffponct">·</span>​not<span class="diffponct">·</span>​explicitly<span class="diffponct">·</span>​flush<span class="diffponct">·</span>​the<span class="diffponct">·</span>​stream<span class="diffponct">·</span>​at<span class="diffponct">·</span>​this<span class="diffponct">·</span>​point.​</td><td class="diffline">56 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​not<span class="diffponct">·</span>​necessary<span class="diffponct">·</span>​not<span class="diffponct">·</span>​explicitly<span class="diffponct">·</span>​flush<span class="diffponct">·</span>​the<span class="diffponct">·</span>​stream<span class="diffponct">·</span>​at<span class="diffponct">·</span>​this<span class="diffponct">·</span>​point.​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">57 </td><td class="diffpresent"></td><td class="diffline">57 </td><td class="diffpresent"></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">58 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​Check<span class="diffponct">·</span>​that<span class="diffponct">·</span>​response<span class="diffponct">·</span>​is<span class="diffponct">·</span>​OK.​</td><td class="diffline">58 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​Check<span class="diffponct">·</span>​that<span class="diffponct">·</span>​response<span class="diffponct">·</span>​is<span class="diffponct">·</span>​OK.​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">59 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​string<span class="diffponct">·</span>​http_version;​</td><td class="diffline">59 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​string<span class="diffponct">·</span>​http_version;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">60 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s<span class="diffponct">·</span>​>><span class="diffponct">·</span>​http_version;​</td><td class="diffline">60 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s<span class="diffponct">·</span>​>><span class="diffponct">·</span>​http_version;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">61 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​unsigned<span class="diffponct">·</span>​int<span class="diffponct">·</span>​status_code;​</td><td class="diffline">61 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​unsigned<span class="diffponct">·</span>​int<span class="diffponct">·</span>​status_code;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">62 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s<span class="diffponct">·</span>​>><span class="diffponct">·</span>​status_code;​</td><td class="diffline">62 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​s<span class="diffponct">·</span>​>><span class="diffponct">·</span>​status_code;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">63 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​string<span class="diffponct">·</span>​status_message;​</td><td class="diffline">63 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​string<span class="diffponct">·</span>​status_message;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">64 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​getline(s,​<span class="diffponct">·</span>​status_message)​;​</td><td class="diffline">64 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​getline(s,​<span class="diffponct">·</span>​status_message)​;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">65 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​if<span class="diffponct">·</span>​(!s<span class="diffponct">·</span>​||<span class="diffponct">·</span>​http_version.​substr(0,​<span class="diffponct">·</span>​5)​<span class="diffponct">·</span>​!=<span class="diffponct">·</span>​"HTTP/​")​</td><td class="diffline">65 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​if<span class="diffponct">·</span>​(!s<span class="diffponct">·</span>​||<span class="diffponct">·</span>​http_version.​substr(0,​<span class="diffponct">·</span>​5)​<span class="diffponct">·</span>​!=<span class="diffponct">·</span>​"HTTP/​")​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">66 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​{</td><td class="diffline">66 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​{</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">67 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Invalid<span class="diffponct">·</span>​response\n";​</td><td class="diffline">67 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Invalid<span class="diffponct">·</span>​response\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">68 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​return<span class="diffponct">·</span>​1;​</td><td class="diffline">68 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​return<span class="diffponct">·</span>​1;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">69 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​}</td><td class="diffline">69 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​}</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">70 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​if<span class="diffponct">·</span>​(status_code<span class="diffponct">·</span>​!=<span class="diffponct">·</span>​200)​</td><td class="diffline">70 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​if<span class="diffponct">·</span>​(status_code<span class="diffponct">·</span>​!=<span class="diffponct">·</span>​200)​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">71 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​{</td><td class="diffline">71 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​{</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">72 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Response<span class="diffponct">·</span>​returned<span class="diffponct">·</span>​with<span class="diffponct">·</span>​status<span class="diffponct">·</span>​code<span class="diffponct">·</span>​"<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​status_code<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"\n";​</td><td class="diffline">72 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Response<span class="diffponct">·</span>​returned<span class="diffponct">·</span>​with<span class="diffponct">·</span>​status<span class="diffponct">·</span>​code<span class="diffponct">·</span>​"<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​status_code<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">73 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​return<span class="diffponct">·</span>​1;​</td><td class="diffline">73 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​return<span class="diffponct">·</span>​1;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">74 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​}</td><td class="diffline">74 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​}</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">75 </td><td class="diffpresent"></td><td class="diffline">75 </td><td class="diffpresent"></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">76 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​Process<span class="diffponct">·</span>​the<span class="diffponct">·</span>​response<span class="diffponct">·</span>​headers,​<span class="diffponct">·</span>​which<span class="diffponct">·</span>​are<span class="diffponct">·</span>​terminated<span class="diffponct">·</span>​by<span class="diffponct">·</span>​a<span class="diffponct">·</span>​blank<span class="diffponct">·</span>​line.​</td><td class="diffline">76 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​Process<span class="diffponct">·</span>​the<span class="diffponct">·</span>​response<span class="diffponct">·</span>​headers,​<span class="diffponct">·</span>​which<span class="diffponct">·</span>​are<span class="diffponct">·</span>​terminated<span class="diffponct">·</span>​by<span class="diffponct">·</span>​a<span class="diffponct">·</span>​blank<span class="diffponct">·</span>​line.​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">77 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​string<span class="diffponct">·</span>​header;​</td><td class="diffline">77 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​string<span class="diffponct">·</span>​header;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">78 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​while<span class="diffponct">·</span>​(std:​:​getline(s,​<span class="diffponct">·</span>​header)​<span class="diffponct">·</span>​&&<span class="diffponct">·</span>​header<span class="diffponct">·</span>​!=<span class="diffponct">·</span>​"\r")​</td><td class="diffline">78 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​while<span class="diffponct">·</span>​(std:​:​getline(s,​<span class="diffponct">·</span>​header)​<span class="diffponct">·</span>​&&<span class="diffponct">·</span>​header<span class="diffponct">·</span>​!=<span class="diffponct">·</span>​"\r")​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">79 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​header<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"\n";​</td><td class="diffline">79 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​header<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">80 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"\n";​</td><td class="diffline">80 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">81 </td><td class="diffpresent"></td><td class="diffline">81 </td><td class="diffpresent"></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">82 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​Write<span class="diffponct">·</span>​the<span class="diffponct">·</span>​remaining<span class="diffponct">·</span>​data<span class="diffponct">·</span>​to<span class="diffponct">·</span>​output.​</td><td class="diffline">82 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​/​/​<span class="diffponct">·</span>​Write<span class="diffponct">·</span>​the<span class="diffponct">·</span>​remaining<span class="diffponct">·</span>​data<span class="diffponct">·</span>​to<span class="diffponct">·</span>​output.​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">83 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​s.​rdbuf()​;​</td><td class="diffline">83 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​s.​rdbuf()​;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">84 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​}</td><td class="diffline">84 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​}</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">85 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​catch<span class="diffponct">·</span>​(std:​:​exception&<span class="diffponct">·</span>​e)​</td><td class="diffline">85 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​catch<span class="diffponct">·</span>​(std:​:​exception&<span class="diffponct">·</span>​e)​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">86 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​{</td><td class="diffline">86 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​{</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">87 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Exception:​<span class="diffponct">·</span>​"<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​e.​what()​<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"\n";​</td><td class="diffline">87 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​<span class="diffponct">·</span>​std:​:​cout<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"Exception:​<span class="diffponct">·</span>​"<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​e.​what()​<span class="diffponct">·</span>​<<<span class="diffponct">·</span>​"\n";​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">88 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​}</td><td class="diffline">88 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​}</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">89 </td><td class="diffpresent"></td><td class="diffline">89 </td><td class="diffpresent"></td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">90 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​return<span class="diffponct">·</span>​0;​</td><td class="diffline">90 </td><td class="diffpresent"><span class="diffponct">·</span>​<span class="diffponct">·</span>​return<span class="diffponct">·</span>​0;​</td></tr>
|
|
<tr class="diffunmodified"><td class="diffline">91 </td><td class="diffpresent">}</td><td class="diffline">91 </td><td class="diffpresent">}</td></tr>
|
|
|
|
</table>
|
|
|
|
<footer>
|
|
<p>Modified at 30.07.2023. HTML formatting created by <a href="http://git.droids-corp.org/gitweb/?p=diff2html;a=summary">diff2html</a>. </p>
|
|
</footer>
|
|
</body></html>
|