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

Comparing trunk/Search/HttpHandler.h (file contents):
Revision 13 by douglas, 2002-12-06T19:56:56-08:00 vs.
Revision 18 by douglas, 2002-12-09T21:40:12-08:00

# Line 82 | Line 82 | inline int closesocket(SOCKET s) { retur
82   class HttpHandler
83   {
84   private:
85 +        enum code {ok = 200, choices = 300, moved = 301, found = 302, notfound =
86 +                404, internal = 500};
87 + #ifdef _WIN32
88 +        WSADATA data;
89 + #endif // _WIN32
90          SOCKET http;
91 <        int begin;
91 >        char* buffer;
92 >        unsigned begin;
93          string page;
94          string type;
95          unsigned length;
96 <        void error(const string prefix, bool host = false);
96 >        string location;
97 >        bool chunked;
98 >        void putline(const string line = "");
99 >        string getline();
100 >        void error(const string& prefix, bool host = false);
101   public:
102          HttpHandler();
103          ~HttpHandler();
104 <        bool connect(URL& url, bool head = false);
104 >        bool handle(URL& url, bool head = false);
105          HttpHandler& getline(string& line, char endline = '\n');
106          bool good();
107          void clear();
108          string contentType() { return type; }
109          unsigned contentLength() { return length; }
110 +        string redirect() { return location; }
111   };
112  
113   #endif // _HttpHandler_h_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines