--- parser3/src/include/pa_common.h 2009/07/07 23:49:54 1.132 +++ parser3/src/include/pa_common.h 2009/08/30 05:28:41 1.134 @@ -8,7 +8,7 @@ #ifndef PA_COMMON_H #define PA_COMMON_H -static const char * const IDENT_COMMON_H="$Date: 2009/07/07 23:49:54 $"; +static const char * const IDENT_COMMON_H="$Date: 2009/08/30 05:28:41 $"; #include "pa_string.h" #include "pa_hash.h" @@ -19,13 +19,31 @@ class Request; #define HTTP_USER_AGENT_UPPER "USER-AGENT" #define HTTP_CONTENT_TYPE_UPPER "CONTENT-TYPE" #define HTTP_USER_AGENT "User-Agent" +#define HTTP_STATUS "Status" +#define HTTP_CONTENT_LENGTH "Content-Length" + #define HTTP_CONTENT_TYPE "Content-Type" -#define HTTP_CONTENT_DISPOSITION "Content-Disposition" #define HTTP_CONTENT_TYPE_FORM_URLENCODED "application/x-www-form-urlencoded" #define HTTP_CONTENT_TYPE_MULTIPART_FORMDATA "multipart/form-data" #define HTTP_CONTENT_TYPE_MULTIPART_RELATED "multipart/related" #define HTTP_CONTENT_TYPE_MULTIPART_MIXED "multipart/mixed" +#define CONTENT_TRANSFER_ENCODING_NAME "Content-Transfer-Encoding" + +#define CONTENT_DISPOSITION "Content-Disposition" +#define CONTENT_DISPOSITION_LOWER "content-disposition" +#define CONTENT_DISPOSITION_ATTACHMENT "attachment" +#define CONTENT_DISPOSITION_INLINE "inline" +#define CONTENT_DISPOSITION_FILENAME_NAME "filename" + +const String content_transfer_encoding_name(CONTENT_TRANSFER_ENCODING_NAME); + +const String content_disposition(CONTENT_DISPOSITION); +const String content_disposition_inline(CONTENT_DISPOSITION_INLINE); +const String content_disposition_attachment(CONTENT_DISPOSITION_ATTACHMENT); +const String content_disposition_filename_name(CONTENT_DISPOSITION_FILENAME_NAME); + + #define HASH_ORDER #ifdef HASH_ORDER @@ -237,7 +255,7 @@ void back_slashes_to_slashes(char *s); bool StrStartFromNC(const char* str, const char* substr, bool equal=false); size_t strpos(const char *str, const char *substr); -Charset* detect_charset(const char* content_type, bool already_uppercased=false); +Charset* detect_charset(const char* content_type); #define SECS_PER_DAY (60*60*24) int getMonthDays(int year, int month);