NPE in WebClientInfo when user-agent header is not sent
-------------------------------------------------------
Key: WICKET-475
URL: https://issues.apache.org/jira/browse/WICKET-475
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.2.6, 1.3
Reporter: Martijn Dashorst
Fix For: 1.2.6, 1.3
When the user agent http header is not set, the webclientinfo will throw either
a NPE or a WicketRuntimeException (depending on the constructor called). This
is not handy as the header can be omitted by clients.
In a discussion on @dev Eelco said:
I guess I was wrong in expecting a user agent header would always be
avaible. So WebClientInfo should accept null, and then in init() do
nothing.
Another thing I'm wondering is whether this is a quirk, or whether you
can expect a client that doesn't send a user-agent header to never
send it. Cause if is a quirk, and does send it with a next request, we
might want to try to reconstruct the WebClientInfo object. That's a
bit more complicated to achieve but doable. We just need to decide if
that's the best way to go.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.