hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Weber (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCORE-65) Allow for explicit null in HttpContext and HttpParams
Date Sun, 08 Apr 2007 17:03:32 GMT

    [ https://issues.apache.org/jira/browse/HTTPCORE-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487450
] 

Roland Weber commented on HTTPCORE-65:
--------------------------------------

Hi Oleg,

I'm thinking from an application programmer's perspective. There is some component in HttpConn
or HttpNIO or HttpAuth or whatever that expects and interprets parameters. For example a connection.
There are default parameters loaded from somewhere, which get picked up by that HttpComponent.
Now the application developer realizes that the defaults are good in general, but there is
this one request that does not get executed correctly because of the default. If another value
has to be set to replace the default, that is fine. Just put it in the request parameters.
But what if there is no other value to be set, but only the default that should be unset?
The application programmer has control over the HttpParam leaf object that is used by the
component, but not over the component itself. Unless you expect application developers to
hack HttpComponents code in this situation.

I recently stumbled over a case where explicit null values are used in a configuration file
because of this problem. I didn't write it down though, so I don't have a link.

cheers,
  Roland


> Allow for explicit null in HttpContext and HttpParams
> -----------------------------------------------------
>
>                 Key: HTTPCORE-65
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-65
>             Project: HttpComponents Core
>          Issue Type: Improvement
>          Components: HttpCore
>    Affects Versions: 4.0-alpha4
>            Reporter: Roland Weber
>            Priority: Minor
>
> Both HttpContext and HttpParams support hierarchies. The current implementations ([Sync]HttpExecutionContext,
BasicHttpParams) do allow for overriding a parent/default value with another value, but they
do not allow for overriding with null. Implementation alternatives:
> - lookup the map entry instead of the value, do not fall back to parent/default if an
entry is there with a null value
> - use a dedicated constant to represent an explicit null value
> cheers,
>   Roland

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message