ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/HttpConnector/HttpConnector.cpp
(Generate patch)

Comparing trunk/HttpConnector/HttpConnector.cpp (file contents):
Revision 352 by douglas, 2003-02-19T22:55:36-08:00 vs.
Revision 353 by Douglas Thrift, 2004-06-03T17:29:49-07:00

# Line 174 | Line 174 | int main(int argc, char* argv[])
174                  {
175                          size = recv(sock, &byte, 1, 0);
176  
177 <                        if (byte != '\r' && byte != '\n')
177 >                        if (size == 0) break;
178 >                        else if (byte != '\r' && byte != '\n')
179                          {
180                                  line += byte;
181                          }
182                  }
183                  while (byte != '\n');
184  
185 <                cout << line << (size == 1 ? "\n" : "");
185 >                cout << line << (size == 1 ? "\n" : "") << flush;
186  
187                  line.erase();
188          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines