root / trunk / src / dot / proxy / client.h

Revision 7735, 3.6 kB (checked in by BradNeuberg, 22 months ago)

Created infrastructure to be able to give a 'testDomain' and a 'testDomainAddress' to test disconnected web applications on your own local machine -- Polipo doesn't look up the etc/hosts file, which would be difficult to parse, so we use this as an alternative. Tested on Safari, Firefox, and IE on Windows and Mac/x86

Line 
1/*
2Copyright (c) 2003-2006 by Juliusz Chroboczek
3
4Permission is hereby granted, free of charge, to any person obtaining a copy
5of this software and associated documentation files (the "Software"), to deal
6in the Software without restriction, including without limitation the rights
7to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8copies of the Software, and to permit persons to whom the Software is
9furnished to do so, subject to the following conditions:
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20THE SOFTWARE.
21*/
22
23extern int httpClientReplayNeeded(HTTPConnectionPtr serverConnection);
24extern int httpClientReplay(HTTPConnectionPtr serverConnection);
25
26int httpAccept(int, FdEventHandlerPtr, AcceptRequestPtr);
27void httpClientFinish(HTTPConnectionPtr connection, int s);
28int httpClientHandler(int, FdEventHandlerPtr, StreamRequestPtr);
29int httpClientNoticeError(HTTPRequestPtr, int code, struct _Atom *message);
30int httpClientError(HTTPRequestPtr, int code, struct _Atom *message);
31int httpClientNewError(HTTPConnectionPtr, int method, int persist,
32                       int code, struct _Atom *message);
33int httpClientRawError(HTTPConnectionPtr, int, struct _Atom*, int close);
34int httpErrorStreamHandler(int status,
35                           FdEventHandlerPtr event,
36                           StreamRequestPtr request);
37int httpErrorNocloseStreamHandler(int status,
38                                  FdEventHandlerPtr event,
39                                  StreamRequestPtr request);
40int httpErrorNofinishStreamHandler(int status,
41                                   FdEventHandlerPtr event,
42                                   StreamRequestPtr request);
43int httpClientRequest(HTTPRequestPtr request, AtomPtr url);
44int httpClientRequestContinue(int forbidden_code, AtomPtr url,
45                              AtomPtr forbidden_message,
46                              AtomPtr forbidden_headers,
47                              void *closure);
48int httpClientDiscardBody(HTTPConnectionPtr connection);
49int httpClientDiscardHandler(int, FdEventHandlerPtr, StreamRequestPtr);
50int httpClientGetHandler(int, ConditionHandlerPtr);
51int httpClientHandlerHeaders(FdEventHandlerPtr event,
52                                StreamRequestPtr request,
53                                HTTPConnectionPtr connection);
54int httpClientNoticeRequest(HTTPRequestPtr request, int);
55int httpServeObject(HTTPConnectionPtr);
56int delayedHttpServeObject(HTTPConnectionPtr connection);
57int httpServeObjectStreamHandler(int status,
58                                 FdEventHandlerPtr event,
59                                 StreamRequestPtr request);
60int httpServeObjectStreamHandler2(int status,
61                                  FdEventHandlerPtr event,
62                                  StreamRequestPtr request);
63int httpServeObjectHandler(int, ConditionHandlerPtr);
64int httpClientSideRequest(HTTPRequestPtr request);
65int httpClientSideHandler(int status,
66                           FdEventHandlerPtr event,
67                           StreamRequestPtr srequest);
68AtomPtr removeBrowserBust(AtomPtr url);
69AtomPtr handleTestDomain(AtomPtr url);
Note: See TracBrowser for help on using the browser.