LLK/scratch-flash — pull request #314 by nathan (2014-06-30 21:27:01+00:00)
Title: Match protocol more closely for /poll in HTTP extensions

This makes the /poll parser for HTTP extensions more closely match the documentation. The documentation states that:

> …the sensor name and value should be separated by a space character. String values should be URL- encoded.

Scratch currently interprets the following line:

sensorName value with spaces

as setting `sensorName` to `value`. This pull request changes Scratch to interpret it as setting `sensorName` to `value with spaces`.

It also makes Scratch more literal with its interpretation of spaces in the input, which the documentation suggests ("separated by **a space character**") is the correct behavior. Whereas Scratch currently interprets the following line:

sensorName foo bar

as setting `sensorName` to `foo`, this branch interprets it as setting `sensorName` to ` foo bar`.

This pull request fixes Scratch ignoring a line that attempts to set a sensor to the empty string without a trailing space:

sensorName

Scratch currently interprets some string values (like `" "` or `""`) as numbers. This pull request fixes this incorrect behavior.