[En-Nut-Discussion] Failed HTTP request

Nathan Moore nategoose at gmail.com
Wed Apr 20 19:36:24 CEST 2011


I had noticed that that value seemed a little bit low before, but only
had problems
with the file name + get arguments length being too long.  We just tried to make
sure that those never got too long.

The ideal solution is to scan and parse the input from a character stream rather
than using a fixed width buffer, and try to discard anything that you
don't need or
understand as it comes in and save copies of what you do need.
That's complicated code though, and you could still get into trouble
if one lexeme
(word) is too long since you have to save them somewhere.

Another thought is if you can use realloc to resize the buffer if you
don't have a full
line in it -- implementing a getline function, if you don't already have one.

Nathan


More information about the En-Nut-Discussion mailing list