Annotation of parser3/src/include/pa_http.h, revision 1.7
1.1 paf 1: /** @file
2: Parser: commonly used functions.
3:
1.7 ! moko 4: Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com)
1.1 paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
6: */
7:
8: #ifndef PA_HTTP_H
9: #define PA_HTTP_H
10:
1.7 ! moko 11: #define IDENT_PA_HTTP_H "$Id: 2010-12-29 12:17:58 $"
1.1 paf 12:
13: #include "pa_vstring.h"
14: #include "pa_vint.h"
15: #include "pa_vhash.h"
16: #include "pa_vtable.h"
17: #include "pa_socks.h"
18:
19: #ifdef CYGWIN
20: #define _GNU_H_WINDOWS32_SOCKETS
21: // for PASCAL
22: #include <windows.h>
23: // SOCKET
24: typedef u_int SOCKET;
25: int PASCAL closesocket(SOCKET);
26: #else
27: # if defined(WIN32)
28: # include <windows.h>
29: # else
30: # define closesocket close
31: # endif
32: #endif
33:
34: #ifndef DOXYGEN
35: struct File_read_http_result {
36: char *str; size_t length;
37: HashStringValue* headers;
38: };
39: #endif
40:
1.6 moko 41: char *pa_http_safe_header_name(const char *name);
42:
1.4 misha 43: File_read_http_result pa_internal_file_read_http(Request& r,
1.3 misha 44: const String& file_spec,
45: bool as_text,
1.2 misha 46: HashStringValue *options=0,
47: bool transcode_text_result=true);
1.1 paf 48:
49: #endif
E-mail: