This assertion was triggered when FwdState tries to re-forward a
request. The first request fails, but can be retried. If the first
ServerState gets destroyed before the second ServerState gets
created, the FwdState refcount goes to zero. The FwdState destructor
has the above assertion because it expects an ErrorState for the
StoreEntry with no content.
This condition can easily happen because the second ServerState
isn't created until the origin server connection is established.
ie:
The clientReplyContext class now keeps a refcounted pointer to
FwdState. This was done so that FwdState refcount doesn't go to
zero during a "reforward" between the time when the initial ServerSide
gets destroyed and before the second attempt ServerSide gets created.
We don't really want to keep FwdState around until the client is
finished. As an future optimization we can remove the client side
reference around the time when the ENTRY_FWD_HDR_WAIT bit gets
cleared.