Initial commit.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl / http.h
blob0c41666c6b87b583d9e885b16469be1e5029bdd3
1 #ifndef __HTTP_H
2 #define __HTTP_H
4 /***************************************************************************
5 * _ _ ____ _
6 * Project ___| | | | _ \| |
7 * / __| | | | |_) | |
8 * | (__| |_| | _ <| |___
9 * \___|\___/|_| \_\_____|
11 * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
13 * This software is licensed as described in the file COPYING, which
14 * you should have received as part of this distribution. The terms
15 * are also available at http://curl.haxx.se/docs/copyright.html.
17 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
18 * copies of the Software, and permit persons to whom the Software is
19 * furnished to do so, under the terms of the COPYING file.
21 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
22 * KIND, either express or implied.
24 * $Id: http.h,v 1.2 2007/03/15 19:22:13 andy Exp $
25 ***************************************************************************/
26 #ifndef CURL_DISABLE_HTTP
27 bool Curl_compareheader(char *headerline, /* line to check */
28 const char *header, /* header keyword _with_ colon */
29 const char *content); /* content string to find */
31 /* ftp can use this as well */
32 CURLcode Curl_proxyCONNECT(struct connectdata *conn,
33 int tunnelsocket,
34 char *hostname, int remote_port);
36 /* protocol-specific functions set up to be called by the main engine */
37 CURLcode Curl_http(struct connectdata *conn, bool *done);
38 CURLcode Curl_http_done(struct connectdata *, CURLcode, bool premature);
39 CURLcode Curl_http_connect(struct connectdata *conn, bool *done);
40 CURLcode Curl_https_connecting(struct connectdata *conn, bool *done);
41 int Curl_https_getsock(struct connectdata *conn,
42 curl_socket_t *socks,
43 int numsocks);
45 /* The following functions are defined in http_chunks.c */
46 void Curl_httpchunk_init(struct connectdata *conn);
47 CHUNKcode Curl_httpchunk_read(struct connectdata *conn, char *datap,
48 ssize_t length, ssize_t *wrote);
50 /* These functions are in http.c */
51 void Curl_http_auth_stage(struct SessionHandle *data, int stage);
52 CURLcode Curl_http_input_auth(struct connectdata *conn,
53 int httpcode, char *header);
54 CURLcode Curl_http_auth_act(struct connectdata *conn);
56 int Curl_http_should_fail(struct connectdata *conn);
58 /* If only the PICKNONE bit is set, there has been a round-trip and we
59 selected to use no auth at all. Ie, we actively select no auth, as opposed
60 to not having one selected. The other CURLAUTH_* defines are present in the
61 public curl/curl.h header. */
62 #define CURLAUTH_PICKNONE (1<<30) /* don't use auth */
64 /* MAX_INITIAL_POST_SIZE indicates the number of bytes that will make the POST
65 data get included in the initial data chunk sent to the server. If the
66 data is larger than this, it will automatically get split up in multiple
67 system calls.
69 This value used to be fairly big (100K), but we must take into account that
70 if the server rejects the POST due for authentication reasons, this data
71 will always be uncondtionally sent and thus it may not be larger than can
72 always be afforded to send twice.
74 It must not be greater than 64K to work on VMS.
76 #ifndef MAX_INITIAL_POST_SIZE
77 #define MAX_INITIAL_POST_SIZE (64*1024)
78 #endif
80 #ifndef TINY_INITIAL_POST_SIZE
81 #define TINY_INITIAL_POST_SIZE 1024
82 #endif
84 #endif
85 #endif