diff options
Diffstat (limited to 'tinyHTTP/include/tinyhttp/headers')
12 files changed, 117 insertions, 130 deletions
diff --git a/tinyHTTP/include/tinyhttp/headers/thttp_header.h b/tinyHTTP/include/tinyhttp/headers/thttp_header.h index 0545ebf..055fdb1 100755 --- a/tinyHTTP/include/tinyhttp/headers/thttp_header.h +++ b/tinyHTTP/include/tinyhttp/headers/thttp_header.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-2011 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -58,32 +58,30 @@ typedef int (*thttp_header_value_tostring_f)(const struct thttp_header_s* header * * @brief List of all supported headers. **/ -typedef enum thttp_header_type_e -{ - thttp_htype_Authorization, - thttp_htype_Content_Length, - thttp_htype_Content_Type, - thttp_htype_Dummy, - thttp_htype_ETag, - thttp_htype_Proxy_Authenticate, - thttp_htype_Proxy_Authorization, - thttp_htype_Sec_WebSocket_Accept, - thttp_htype_Sec_WebSocket_Protocol, - thttp_htype_Sec_WebSocket_Key, - thttp_htype_Sec_WebSocket_Version, - thttp_htype_Transfer_Encoding, - thttp_htype_WWW_Authenticate, +typedef enum thttp_header_type_e { + thttp_htype_Authorization, + thttp_htype_Content_Length, + thttp_htype_Content_Type, + thttp_htype_Dummy, + thttp_htype_ETag, + thttp_htype_Proxy_Authenticate, + thttp_htype_Proxy_Authorization, + thttp_htype_Sec_WebSocket_Accept, + thttp_htype_Sec_WebSocket_Protocol, + thttp_htype_Sec_WebSocket_Key, + thttp_htype_Sec_WebSocket_Version, + thttp_htype_Transfer_Encoding, + thttp_htype_WWW_Authenticate, } thttp_header_type_t; /*================================ */ -typedef struct thttp_header_s -{ - TSK_DECLARE_OBJECT; - thttp_header_type_t type; - thttp_header_value_tostring_f tostring; - tsk_params_L_t *params; +typedef struct thttp_header_s { + TSK_DECLARE_OBJECT; + thttp_header_type_t type; + thttp_header_value_tostring_f tostring; + tsk_params_L_t *params; } thttp_header_t; diff --git a/tinyHTTP/include/tinyhttp/headers/thttp_header_Authorization.h b/tinyHTTP/include/tinyhttp/headers/thttp_header_Authorization.h index 0543b5b..e591990 100755 --- a/tinyHTTP/include/tinyhttp/headers/thttp_header_Authorization.h +++ b/tinyHTTP/include/tinyhttp/headers/thttp_header_Authorization.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-2011 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -43,23 +43,22 @@ THTTP_BEGIN_DECLS /// credentials = "Digest" digest-response /// digest-response = digest-response-value *(COMMA digest-response-value) /// digest-response-value = ( username / realm / nonce / digest-url / auth-response / [ algorithm ] / [cnonce] / [opaque] / [message-qop] / [nonce-count] / [auth-param] ) -/// +/// //////////////////////////////////////////////////////////////////////////////////////////////////// -typedef struct thttp_header_Authorization_s -{ - THTTP_DECLARE_HEADER; +typedef struct thttp_header_Authorization_s { + THTTP_DECLARE_HEADER; - char* scheme; - char* username; - char* realm; - char* nonce; - char* uri; - char* response; - char* algorithm; - char* cnonce; - char* opaque; - char* qop; - char* nc; + char* scheme; + char* username; + char* realm; + char* nonce; + char* uri; + char* response; + char* algorithm; + char* cnonce; + char* opaque; + char* qop; + char* nc; } thttp_header_Authorization_t; typedef thttp_header_Authorization_t thttp_header_Proxy_Authorization_t; diff --git a/tinyHTTP/include/tinyhttp/headers/thttp_header_Content_Length.h b/tinyHTTP/include/tinyhttp/headers/thttp_header_Content_Length.h index 9d7b4a9..3e87d69 100755 --- a/tinyHTTP/include/tinyhttp/headers/thttp_header_Content_Length.h +++ b/tinyHTTP/include/tinyhttp/headers/thttp_header_Content_Length.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-2011 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -42,13 +42,12 @@ THTTP_BEGIN_DECLS /// /// @par ABNF: Content-Length / l /// Content-Length = "Content-Length" HCOLON 1*DIGIT -/// +/// //////////////////////////////////////////////////////////////////////////////////////////////////// -typedef struct thttp_header_Content_Length_s -{ - THTTP_DECLARE_HEADER; +typedef struct thttp_header_Content_Length_s { + THTTP_DECLARE_HEADER; - uint32_t length; + uint32_t length; } thttp_header_Content_Length_t; diff --git a/tinyHTTP/include/tinyhttp/headers/thttp_header_Content_Type.h b/tinyHTTP/include/tinyhttp/headers/thttp_header_Content_Type.h index 17e0d53..51a8a9f 100755 --- a/tinyHTTP/include/tinyhttp/headers/thttp_header_Content_Type.h +++ b/tinyHTTP/include/tinyhttp/headers/thttp_header_Content_Type.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-2011 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -54,13 +54,12 @@ THTTP_BEGIN_DECLS /// m-parameter = m-attribute EQUAL m-value /// m-attribute = token /// m-value = token / quoted-string -/// +/// //////////////////////////////////////////////////////////////////////////////////////////////////// -typedef struct thttp_header_Content_Type_s -{ - THTTP_DECLARE_HEADER; +typedef struct thttp_header_Content_Type_s { + THTTP_DECLARE_HEADER; - char* type; + char* type; } thttp_header_Content_Type_t; diff --git a/tinyHTTP/include/tinyhttp/headers/thttp_header_Dummy.h b/tinyHTTP/include/tinyhttp/headers/thttp_header_Dummy.h index 9e5293d..e56e157 100755 --- a/tinyHTTP/include/tinyhttp/headers/thttp_header_Dummy.h +++ b/tinyHTTP/include/tinyhttp/headers/thttp_header_Dummy.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-2011 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -41,14 +41,13 @@ THTTP_BEGIN_DECLS /// HTTP Dummy header. /// /// @par ABNF : token SP* HCOLON SP*<: any* -/// +/// //////////////////////////////////////////////////////////////////////////////////////////////////// -typedef struct thttp_header_Dummy_s -{ - THTTP_DECLARE_HEADER; +typedef struct thttp_header_Dummy_s { + THTTP_DECLARE_HEADER; - char *name; - char *value; + char *name; + char *value; } thttp_header_Dummy_t; diff --git a/tinyHTTP/include/tinyhttp/headers/thttp_header_ETag.h b/tinyHTTP/include/tinyhttp/headers/thttp_header_ETag.h index 651520b..1c45cc1 100755 --- a/tinyHTTP/include/tinyhttp/headers/thttp_header_ETag.h +++ b/tinyHTTP/include/tinyhttp/headers/thttp_header_ETag.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-2011 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -45,12 +45,11 @@ THTTP_BEGIN_DECLS /// weak = "W/" /// opaque-tag = quoted-string //////////////////////////////////////////////////////////////////////////////////////////////////// -typedef struct thttp_header_ETag_s -{ - THTTP_DECLARE_HEADER; +typedef struct thttp_header_ETag_s { + THTTP_DECLARE_HEADER; - char *value; - tsk_bool_t isWeak; + char *value; + tsk_bool_t isWeak; } thttp_header_ETag_t; diff --git a/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Accept.h b/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Accept.h index b13ab4e..3813a0d 100755 --- a/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Accept.h +++ b/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Accept.h @@ -2,19 +2,19 @@ * Copyright (C) 2012 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango(dot)org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -36,11 +36,10 @@ THTTP_BEGIN_DECLS #define THTTP_HEADER_SEC_WEBSOCKET_ACCEPT_VA_ARGS(key) thttp_header_Sec_WebSocket_Accept_def_t, (const char*)key -typedef struct thttp_header_Sec_WebSocket_Accept_s -{ - THTTP_DECLARE_HEADER; - - char *value; +typedef struct thttp_header_Sec_WebSocket_Accept_s { + THTTP_DECLARE_HEADER; + + char *value; } thttp_header_Sec_WebSocket_Accept_t; diff --git a/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Key.h b/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Key.h index 679551a..42da71e 100755 --- a/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Key.h +++ b/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Key.h @@ -2,19 +2,19 @@ * Copyright (C) 2012 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango(dot)org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -36,11 +36,10 @@ THTTP_BEGIN_DECLS #define THTTP_HEADER_SEC_WEBSOCKET_KEY_VA_ARGS(key) thttp_header_Sec_WebSocket_Key_def_t, (const char*)key -typedef struct thttp_header_Sec_WebSocket_Key_s -{ - THTTP_DECLARE_HEADER; - - char *value; +typedef struct thttp_header_Sec_WebSocket_Key_s { + THTTP_DECLARE_HEADER; + + char *value; } thttp_header_Sec_WebSocket_Key_t; diff --git a/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Protocol.h b/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Protocol.h index c132c66..4fb6732 100755 --- a/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Protocol.h +++ b/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Protocol.h @@ -2,19 +2,19 @@ * Copyright (C) 2012 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango(dot)org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -38,11 +38,10 @@ THTTP_BEGIN_DECLS #define THTTP_HEADER_SEC_WEBSOCKET_PROTOCOL_VA_ARGS(protocol) thttp_header_Sec_WebSocket_Protocol_def_t, (const char*)protocol -typedef struct thttp_header_Sec_WebSocket_Protocol_s -{ - THTTP_DECLARE_HEADER; - - tsk_strings_L_t *values; +typedef struct thttp_header_Sec_WebSocket_Protocol_s { + THTTP_DECLARE_HEADER; + + tsk_strings_L_t *values; } thttp_header_Sec_WebSocket_Protocol_t; diff --git a/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Version.h b/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Version.h index 777d787..32d44bc 100755 --- a/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Version.h +++ b/tinyHTTP/include/tinyhttp/headers/thttp_header_Sec_WebSocket_Version.h @@ -2,19 +2,19 @@ * Copyright (C) 2012 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango(dot)org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -38,11 +38,10 @@ THTTP_BEGIN_DECLS #define THTTP_HEADER_SEC_WEBSOCKET_VERSION_VA_ARGS(version) thttp_header_Sec_WebSocket_Version_def_t, (const char*)version -typedef struct thttp_header_Sec_WebSocket_Version_s -{ - THTTP_DECLARE_HEADER; - - tsk_strings_L_t *values; +typedef struct thttp_header_Sec_WebSocket_Version_s { + THTTP_DECLARE_HEADER; + + tsk_strings_L_t *values; } thttp_header_Sec_WebSocket_Version_t; diff --git a/tinyHTTP/include/tinyhttp/headers/thttp_header_Transfer_Encoding.h b/tinyHTTP/include/tinyhttp/headers/thttp_header_Transfer_Encoding.h index 762834e..697b20e 100755 --- a/tinyHTTP/include/tinyhttp/headers/thttp_header_Transfer_Encoding.h +++ b/tinyHTTP/include/tinyhttp/headers/thttp_header_Transfer_Encoding.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-2011 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -47,13 +47,12 @@ THTTP_BEGIN_DECLS /// parameter = attribute "=" value /// attribute = token /// value = token / quoted-string -/// +/// //////////////////////////////////////////////////////////////////////////////////////////////////// -typedef struct thttp_header_Transfer_Encoding_s -{ - THTTP_DECLARE_HEADER; +typedef struct thttp_header_Transfer_Encoding_s { + THTTP_DECLARE_HEADER; - char* encoding; + char* encoding; } thttp_header_Transfer_Encoding_t; diff --git a/tinyHTTP/include/tinyhttp/headers/thttp_header_WWW_Authenticate.h b/tinyHTTP/include/tinyhttp/headers/thttp_header_WWW_Authenticate.h index f01dc23..604c557 100755 --- a/tinyHTTP/include/tinyhttp/headers/thttp_header_WWW_Authenticate.h +++ b/tinyHTTP/include/tinyhttp/headers/thttp_header_WWW_Authenticate.h @@ -2,19 +2,19 @@ * Copyright (C) 2010-2011 Mamadou Diop. * * Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org> -* +* * This file is part of Open Source Doubango Framework. * * DOUBANGO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. -* +* * DOUBANGO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with DOUBANGO. * @@ -52,20 +52,19 @@ THTTP_BEGIN_DECLS /// stale = "stale" EQUAL ( "true" / "false" ) /// qop-options = "qop" EQUAL LDQUOT qop-value *("," qop-value) RDQUOT /// qop-value = "auth" / "auth-int" / token -/// +/// //////////////////////////////////////////////////////////////////////////////////////////////////// -typedef struct thttp_header_WWW_Authenticate_s -{ - THTTP_DECLARE_HEADER; +typedef struct thttp_header_WWW_Authenticate_s { + THTTP_DECLARE_HEADER; - char* scheme; - char* realm; - char* domain; - char* nonce; - char* opaque; - tsk_bool_t stale; - char* algorithm; - char* qop; + char* scheme; + char* realm; + char* domain; + char* nonce; + char* opaque; + tsk_bool_t stale; + char* algorithm; + char* qop; } thttp_header_WWW_Authenticate_t; |