I thought I'd take a quick look at the Fossil source code and how it deals with redirects. Though I'm an utter newbie on both Fossil and its internals, there are several things that strike me as odd.
For instance, it looks wrong that redirects are parsed (around line 342 in http.c) *before* the transport is closed (a few lines after). I mean, the *new* URL data is now passed on to the close routines, while I'd say the old parameters should be used here. In other words, should the transport close calls not come *before* the url-parsing?
Also, in http_ssl.c I cannot help but notice that ssl_close checks for iBio to not be NULL, even though it's never initialised at the top (near line 46). My suggestion here would be to always initialise to NULL *and* also make sure that the ssl_close function assigns NULL to iBio after the BIO_reset & BIO_free_all calls.
Combine the 2 points above, and I'd say that the "late" transport closing (i.e. after the new URL data is in place), triggers an incorrect call to ssl_close (because the URL is *now* an HTTPS one!), which in turn is tricked into closing the SSL system even though it was never initialised before[?!].
I haven't tried anything out, yet. But I thought I'd throw this on the list so see what you guys think. So, am I reading this right?
Ashwin. _______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

