The code to trim spaces from the end of the URL behaved undefined if the URL was empty. That scenario is far from hypothetic as i.e. pressing the 'back' button with no (more) entry in the history yields an empty URL.
The way our HTML parser triggers newlines is a guess at best. On the other hand our screen estate is severely limited. Instead of trying to (further) improve the way we translate tags to newlines it seems more reasonable to simply never render more than two successive empty lines.
We don't handle URLs with fragments exactly ;-) well - meaning we send the fragment part to the server and we don't display the document starting at the anchor tag. Instead of adding the missing capabilities and thus adding lots of code I instead opted to simply ignore fragment-only links. This approach is based on the practical knowledge that fragments are primarily used for intra-document navigation - and are as such fragment-only links. And as we ignore them anyway when displaying the document it's more ergonomic to not have those links in the first place.
Complex script code tends to contain other tags inside strings. As we generally don't parse strings we erroneously interpreted those tags. The easiest workaround is to not interpret tags at all until the </SCRIPT> tag is found.
parse_tag() is called both for attributes inside a tag and the end of the tag itself. For most tags parse_tag() doesn't distinguish both cases. This means that the "tag action" is additionally triggered for every tag attribute. When the tag "action" is setting some state this doesn't hurt. For many tags the "tag action" is to render a newline. Superfluous newlines are sort of acceptable to keep the code as small as possible. However the <li> "tag action" is to render a newline followed by an asterisk - and superfluous asterisks are ugly so we check for <li> if parse_tag() was called for the end of the tag itself.
At the time do_word() is called s.word[s.wordlen] is undefined. So it doesn't make sense to make decisions based on its value - and in fact I don't see why it was necessary/desirable in the first place.
Nowadays many HTTP server set cookies which may easily result in HTTP header fields longer than our 'httpheaderline' buffer. It doesn't hurt if we can't parse them but we need to be able to skip them and continue to parse the following header fields.
WWW_CONF_MAX_URLLEN is used as length for the 'editurl' textentry widget. The CTK code for handling that widget uses a single byte so the length can't be > 255. Thus WWW_CONF_MAX_URLLEN can't be > 255 as well.
Currently, the observe value for a response to a GET observe request is always set to zero. That may cause the subsequent notification to have the same observe value. In fact, that happens every time an observable resource is observed for the first time (since the obs_counter is implicitly initialized to zero).
This patch fixes such a problem by setting the observe option value of responses to obs_counter (and then incrementing it).
type process_data_t. This was an artifact when the choice was
made to use the void * type for the data parameter in processes.
Changed parameter 'void * data' of process_post_synch to
process_data_t for consistency.
Checked all the uses of process_start() in contiki and fixed casts
of the data parameter.
This proposed MACRO simplifies jsontree_array declarations. It takes as arguments the name of the array and its size. ( I've modified the indention as requested )
- Up to now the CTK program handler was necessary to start wget and forward the URL. Now alternatively the webbrowser uses the underlying OS to exec wget.
- Up to now windowed CTK was necessary to display the acknowledge dialog. Now alternatively the webbrowser displays the acknowledge text and buttons right in the webpage area.
- For now the targets 'win32' and 'c64' make use of the new capabilities.