Hi Trustin,

Trustin Lee wrote:
On Nov 19, 2007 9:31 PM, Trustin Lee <[EMAIL PROTECTED]> wrote:
Yep, I thought the same, but updating requestUri every time is too
expensive.  As an alternative, there's 'normalize()' method in
MutableHttpRequest (and consequently in DefaultHttpRequest).  It adds
proper header fields and updates requestUri when there are one or more
parameters.  I didn't call normalize() explicitly in the encoder for
those who wants to do something special (?).  Please let me know if
there will never be such a case.  :)
I've just updated JavaDoc that tells you have to call normalize() by
yourself to update the requestUri property to avoid confusion.

Thansk, calling normalize() fixes the issue (my local tests are now 100% green).

However, I'd prefer if the call to normalize() was done by the codec.
Without that normalization, the requests that are sent are not HTTP compliant (wether they are GET or POST for that matter) and won't be usable by anybody including mina's own HttpRequestDecoder. I don't see a use case where I want *not* to call normalize() and break HTTP compatibility... but I don't have enough imagination :)

--
jeff

Reply via email to