patch: a_Capi_get_flags and following redirection
When an image on a page wouldn't load due to redirection, I would isolate the image, and often notice that message about Content-Length not matching message body. The reason is in a_Capi_open_url(), where reload is set by checking a_Capi_get_flags() for CAPI_IsCached. It follows the redirection, determines the Location URL isn't cached, and makes another HTTP request for the original URL. The cache entry data for that URL ends up containing the body from the first request with the header and body from the second request appended to it. Ah, but sometimes we want to follow redirection for get_flags. - the download check in capi - the load_stylesheet check in html.cc, assuming that we want to make that work with redirection at some point. - load_now for images in html.cc and the rest don't really matter too terribly much either way. So, unable to think of anything nice or clever, I added an argument to get_flags specifying whether redirection should be followed.
participants (1)
-
corvid@lavabit.com