Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / lib / http.h
blob1f9102a8761653b8c5869c49adca8d12885f24b7
1 #ifndef __HTTP_H
2 #define __HTTP_H
4 /***************************************************************************
5 * _ _ ____ _
6 * Project ___| | | | _ \| |
7 * / __| | | | |_) | |
8 * | (__| |_| | _ <| |___
9 * \___|\___/|_| \_\_____|
11 * Copyright (C) 1998 - 2008, 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.1.1.1 2008-09-23 16:32:05 hoffman Exp $
25 ***************************************************************************/
26 #ifndef CURL_DISABLE_HTTP
28 extern const struct Curl_handler Curl_handler_http;
30 #ifdef USE_SSL
31 extern const struct Curl_handler Curl_handler_https;
32 #endif
34 bool Curl_compareheader(const char *headerline, /* line to check */
35 const char *header, /* header keyword _with_ colon */
36 const char *content); /* content string to find */
38 char *Curl_copy_header_value(const char *h);
40 /* ftp can use this as well */
41 CURLcode Curl_proxyCONNECT(struct connectdata *conn,
42 int tunnelsocket,
43 const char *hostname, unsigned short remote_port);
45 /* protocol-specific functions set up to be called by the main engine */
46 CURLcode Curl_http(struct connectdata *conn, bool *done);
47 CURLcode Curl_http_done(struct connectdata *, CURLcode, bool premature);
48 CURLcode Curl_http_connect(struct connectdata *conn, bool *done);
50 /* The following functions are defined in http_chunks.c */
51 void Curl_httpchunk_init(struct connectdata *conn);
52 CHUNKcode Curl_httpchunk_read(struct connectdata *conn, char *datap,
53 ssize_t length, ssize_t *wrote);
55 /* These functions are in http.c */
56 void Curl_http_auth_stage(struct SessionHandle *data, int stage);
57 CURLcode Curl_http_input_auth(struct connectdata *conn,
58 int httpcode, const char *header);
59 CURLcode Curl_http_auth_act(struct connectdata *conn);
60 CURLcode Curl_http_perhapsrewind(struct connectdata *conn);
62 int Curl_http_should_fail(struct connectdata *conn);
64 /* If only the PICKNONE bit is set, there has been a round-trip and we
65 selected to use no auth at all. Ie, we actively select no auth, as opposed
66 to not having one selected. The other CURLAUTH_* defines are present in the
67 public curl/curl.h header. */
68 #define CURLAUTH_PICKNONE (1<<30) /* don't use auth */
70 /* MAX_INITIAL_POST_SIZE indicates the number of bytes that will make the POST
71 data get included in the initial data chunk sent to the server. If the
72 data is larger than this, it will automatically get split up in multiple
73 system calls.
75 This value used to be fairly big (100K), but we must take into account that
76 if the server rejects the POST due for authentication reasons, this data
77 will always be uncondtionally sent and thus it may not be larger than can
78 always be afforded to send twice.
80 It must not be greater than 64K to work on VMS.
82 #ifndef MAX_INITIAL_POST_SIZE
83 #define MAX_INITIAL_POST_SIZE (64*1024)
84 #endif
86 #ifndef TINY_INITIAL_POST_SIZE
87 #define TINY_INITIAL_POST_SIZE 1024
88 #endif
90 #endif
91 #endif