--- parser3/src/include/pa_http.h 2005/11/24 12:28:48 1.1 +++ parser3/src/include/pa_http.h 2012/06/20 20:54:25 1.8 @@ -1,14 +1,14 @@ /** @file Parser: commonly used functions. - Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_HTTP_H #define PA_HTTP_H -static const char * const IDENT_HTTP_H="$Date: 2005/11/24 12:28:48 $"; +#define IDENT_PA_HTTP_H "$Id: pa_http.h,v 1.8 2012/06/20 20:54:25 moko Exp $" #include "pa_vstring.h" #include "pa_vint.h" @@ -16,22 +16,18 @@ static const char * const IDENT_HTTP_H=" #include "pa_vtable.h" #include "pa_socks.h" -#ifdef CYGWIN -#define _GNU_H_WINDOWS32_SOCKETS -// for PASCAL +#ifdef WIN32 #include -// SOCKET -typedef u_int SOCKET; -int PASCAL closesocket(SOCKET); -#else -# if defined(WIN32) -# include -# else -# define closesocket close -# endif + +#ifdef CYGWIN +typedef u_int SOCKET; +extern "C" int PASCAL FAR closesocket(SOCKET); +#endif + +#else // WIN32 +#define closesocket close #endif -const char* pa_form2string(HashStringValue& form); #ifndef DOXYGEN struct File_read_http_result { char *str; size_t length; @@ -39,9 +35,12 @@ struct File_read_http_result { }; #endif -File_read_http_result pa_internal_file_read_http(Request_charsets& charsets, - const String& file_spec, - bool as_text, - HashStringValue *options=0); +char *pa_http_safe_header_name(const char *name); + +File_read_http_result pa_internal_file_read_http(Request& r, + const String& file_spec, + bool as_text, + HashStringValue *options=0, + bool transcode_text_result=true); #endif