Modified version of NetServices. Fixes an issue where connections failed should the HTTP response status line be received in a packet on its own prior to any further headers. Changes are made to the HTTPClient.cpp file's readHeaders method.

Committer:
andrewbonney
Date:
Fri Apr 08 14:39:41 2011 +0000
Revision:
0:ec559500a63f

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewbonney 0:ec559500a63f 1 /*
andrewbonney 0:ec559500a63f 2 * Author: Adam Dunkels <adam@sics.se>
andrewbonney 0:ec559500a63f 3 *
andrewbonney 0:ec559500a63f 4 */
andrewbonney 0:ec559500a63f 5 #ifndef __LWIP_ARCH_CC_H__
andrewbonney 0:ec559500a63f 6 #define __LWIP_ARCH_CC_H__
andrewbonney 0:ec559500a63f 7
andrewbonney 0:ec559500a63f 8 #define LITTLE_ENDIAN 1234
andrewbonney 0:ec559500a63f 9
andrewbonney 0:ec559500a63f 10 #define BYTE_ORDER LITTLE_ENDIAN
andrewbonney 0:ec559500a63f 11
andrewbonney 0:ec559500a63f 12 typedef unsigned char u8_t;
andrewbonney 0:ec559500a63f 13 typedef signed char s8_t;
andrewbonney 0:ec559500a63f 14 typedef unsigned short u16_t;
andrewbonney 0:ec559500a63f 15 typedef signed short s16_t;
andrewbonney 0:ec559500a63f 16 typedef unsigned int u32_t;
andrewbonney 0:ec559500a63f 17 typedef signed int s32_t;
andrewbonney 0:ec559500a63f 18 typedef unsigned int mem_ptr_t;
andrewbonney 0:ec559500a63f 19
andrewbonney 0:ec559500a63f 20 #ifndef NULL
andrewbonney 0:ec559500a63f 21 #define NULL 0
andrewbonney 0:ec559500a63f 22 #endif
andrewbonney 0:ec559500a63f 23
andrewbonney 0:ec559500a63f 24 #ifndef TRUE
andrewbonney 0:ec559500a63f 25 #define TRUE 1
andrewbonney 0:ec559500a63f 26 #endif
andrewbonney 0:ec559500a63f 27
andrewbonney 0:ec559500a63f 28 #ifndef FALSE
andrewbonney 0:ec559500a63f 29 #define FALSE 0
andrewbonney 0:ec559500a63f 30 #endif
andrewbonney 0:ec559500a63f 31
andrewbonney 0:ec559500a63f 32 #include <stdlib.h>
andrewbonney 0:ec559500a63f 33 #define LWIP_RAND rand
andrewbonney 0:ec559500a63f 34
andrewbonney 0:ec559500a63f 35 #define LWIP_PLATFORM_DIAG(x) DBG x
andrewbonney 0:ec559500a63f 36 #define LWIP_PLATFORM_ASSERT(x) DBG(x)
andrewbonney 0:ec559500a63f 37
andrewbonney 0:ec559500a63f 38 #define LWIP_PROVIDE_ERRNO
andrewbonney 0:ec559500a63f 39
andrewbonney 0:ec559500a63f 40 #define U16_F "hu"
andrewbonney 0:ec559500a63f 41 #define S16_F "hd"
andrewbonney 0:ec559500a63f 42 #define X16_F "hx"
andrewbonney 0:ec559500a63f 43 #define U32_F "lu"
andrewbonney 0:ec559500a63f 44 #define S32_F "ld"
andrewbonney 0:ec559500a63f 45 #define X32_F "lx"
andrewbonney 0:ec559500a63f 46
andrewbonney 0:ec559500a63f 47 #if 0
andrewbonney 0:ec559500a63f 48 /*Create compilation problems, and according to http://www.mail-archive.com/lwip-users@nongnu.org/msg06786.html,
andrewbonney 0:ec559500a63f 49 lwIP uses packed structures, so packing the field is not really a good idea ;) */
andrewbonney 0:ec559500a63f 50 #define PACK_STRUCT_FIELD(x) __packed x
andrewbonney 0:ec559500a63f 51 #else
andrewbonney 0:ec559500a63f 52 #define PACK_STRUCT_FIELD(x) x
andrewbonney 0:ec559500a63f 53 #endif
andrewbonney 0:ec559500a63f 54
andrewbonney 0:ec559500a63f 55 #define PACK_STRUCT_STRUCT
andrewbonney 0:ec559500a63f 56 #define PACK_STRUCT_BEGIN __packed
andrewbonney 0:ec559500a63f 57 #define PACK_STRUCT_END
andrewbonney 0:ec559500a63f 58
andrewbonney 0:ec559500a63f 59 #define LWIP_CHKSUM_ALGORITHM 3
andrewbonney 0:ec559500a63f 60
andrewbonney 0:ec559500a63f 61
andrewbonney 0:ec559500a63f 62 #endif /* __LWIP_ARCH_CC_H__ */