Hallo list, i use neon (version 0.25.5) for a minimalistic webspider. The function "ne_request_dispatch" is used to read response bodies via callback. Although "ne_request_create" and "ne_request_destroy" are called for each single request, multiple requests may be done between calls of "ne_session_create" and "ne_session_destroy". All that worked fine until I stumbled about an apparently broken webserver that sends more data than it specifies in the Content-Length header every now and then. Well, neon complained that it "Could not parse response status line.". Some gdb-sessions later I realized why neon got confused. When it expected to find something like "HTTP/1.1 OK" at the current socket buffer-position, actually there was old overlap-data from the previous response-body within the same session, which had not been consumed by "ne_request_dispatch", because of a Content-Length value that had been too low. I expect the new response to be appended after that overlapping data. If my theory proves true, i need a way to read or at least clean such overlapping data from the socket buffer. I tried a subsequent call to "ne_discard_response" already, but without success. I still could manipulate the socket buffer directly, through inclusion of ne_private.h from the neon source tree, or even hack neon itself, but I would like to choose a more sane way to solve my problem... Any suggestions?
Thanks in advance, Thomas _______________________________________________ neon mailing list [email protected] http://mailman.webdav.org/mailman/listinfo/neon
