jjg/RESTduino — pull request #7 by snargledorf (2012-01-23 19:22:47+00:00)
Title: Arduino 1.0+ compatibility, client reading improvements, case sensitivity improvements

I added precompiler statements for Arduino 1.0+ compatibility which should allow this to still work with older versions of Arduino as well.

```c++
// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
#if defined(ARDUINO) && ARDUINO >= 100
EthernetServer server(80);
#else
Server server(80);
#endif
```

Client reading is a bit faster now. This is done by only reading up to the size of the input buffer then flushing any remaining bytes from the clients buffer.

```c++
// fill url the buffer
if(c != '\n' && c != '\r' && index < BUFSIZE){
clientline[index++] = c;
continue;
}
```

```c++
// Flush any remaining bytes from the client buffer
client.flush();
```

I have added a precompiler statement that can be used to toggle whether incoming requests should be switched to all uppercase before processing, which eliminates the possibility for case sensitive requests but has the bonus of case insensitivity.

```c++
#define CASESENSE 1
```