[EMAIL PROTECTED] wrote:
> > When ajp14 is developed, the spec should really contain a standard response
> > for an "unknown packet", so new packet types (or messages) can be added to
> > the protocol without breaking backward compatability. If we had this in
> > ajp13, we could add some very nice things as negotiated features (e.g.
> > encrypted and/or authenticated connections). However, because ajp13 has no
> > way to respond to an unknown packet, the implementations generally behaves
> > very badly if you send them something they're not expecting.
>
> Hmm. How difficult would be to fix this ? After all, I guess all we need
> is to add some code to behave nicely when unknown packets are received.
> If we can get this into ajp13 implementation - then ajp14 may have some
> backward compatiblities, and will be much easier to evolve.
>
> ( BTW, it would also be nice if ajp13 would call a unknown_packet
> function, so later we may hook into this, without changing anything else )
>
> Costin
>
I dunno. It kind of depends on what "behaving nicely" means. Currently, on
the Java side, if it receives a strange packet type (while waiting for
forwarded requests), it shuts down the (otherwise persistent) connection
back to the web server. Maybe I shouldn't have called that "behaving very
badly". It could leave the connection open and simply not respond. You
could conceivably then write an ajp14 plugin which sent an exploratory
packet and waited for some amount of time before giving up. I'm not crazy
about that, though. Shutting down the connection does have the virtue of
being predictable in the face of bizarre situations.
On the C side, there isn't a general "wait for next request" loop (requests
all originate from the C side). Once it's sent over a forwarded request, it
does enter a loop of waiting for writes and such from the servlet engine.
If it gets a strange packet there, it terminates handling that request, and
signals and error of some sort to the rest of the web server (I think). I'm
not sure what else it could do (again, it could ignore strange packets, but
that seems chancy).
I think this is more a problem with the protocol than anything else -- it's
missing some ability to negotiate. We can try to make the implementations
stable in the face of unexpected packets (which they pretty much are), but I
basically think we should just accept ajp13 for what it is, and think about
adding new features to ajp14 (with negotiation being the most important
one).
-Dan
-Dan
--
Dan Milstein // [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]