|
From: Mark H. <ma...@fi...> - 2011-02-10 18:24:31
|
>Hi all, > I just want to take a moment to report on my latest tweak(s) to >the HTTP add-on. Mark has mentioned on a couple of occasions that the >broadcasts that the HTML parser sometimes receives doesn't contain the >content's MIME type, in particular when loading the page a second time >within any particular Themis session. Due to the nature of the issue, he >thought it might be an issue with the cache system and asked me to >investigate it. > > You'll probably guess correctly, because of the email subject, that the >problem was actually in HTTP. Basically, the HTTP add-on was only adding >the mime type to the broadcasts when the page wasn't found in cache or >the server returned an updated version of the content. (A 200 level HTTP >response rather than a 304 Not Modified response.) I think I deliberately >did this, years ago, because the content type must not have changed if >the server is returning a not modified response. Nonetheless, I didn't >foresee that this would add further complications to other parts of the >app, even though it would be possible to obtain the appropriate >information directly from the cache system. So, I'm now including the >MIME type in just about all "loading progress" broadcasts from HTTP, >which should get the HTML parser working properly. My apologies for >earlier my earlier weirdness... ;-) Hi Raymond, I had some time to test it today and found that the html parser is still not parsing the file again, but now it is going wrong in another part. It now sees that the document is supported and tries to parse it. But before it starts the actual parse, it wants to get the data from the cache and that fails. I think it has something to do that reading from the cache for the second time with the same user token still has the pointer at the end of the file, so there is nothing to read. If that is correct, is there a way to reset the pointer to the start? I couldn't find it with a quick look at the cache header. Mark -- Spangalese for beginnners: `Wiggilo wagel hoggle?' `Where can I scrub my eyeballs?' |