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

Roland Weber commented on HTTPCORE-39:
--------------------------------------

Hi Oleg,

example 1 - WebSphere Portal Server. The locale for the response (content) is 
determined by the following priorities:
a) preferredLocale in the User object
b) Accept-Language header in the request
c) system default locale
(b) and (c) can be addressed based on the request only, but (a) requires access 
to the session. On login, the
user object is not even available until after authentication information in the 
request has been processed. 

example 2: At least one client had the requirement to switch the language by 
clicking on a link in the web page.
When the language is changed, the information is in the request URI. Before and 
afterwards, it is in the session.

In general, the logic for selecting the language of the response (content) can 
be located anywhere in the request
processing. To NLS-enable the reason phrase, we can require to move that logic 
into the reason phrase catalog,
or we can provide a way for the request processing logic to specify the 
language after the response is created.
We could also change the services to allow for request processing that creates 
a new response object, but that
has a magnitude which definitely is out of proportion for such a minor problem.

I'll prepare a patch based on the setLocale() option this week-end.

cheers,
  Roland


> refactor HttpStatus
> -------------------
>
>                 Key: HTTPCORE-39
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-39
>             Project: HttpComponents Core
>          Issue Type: Improvement
>          Components: HttpCore
>    Affects Versions: 4.0-alpha3
>            Reporter: Roland Weber
>         Assigned To: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-alpha4
>
>         Attachments: 2k7-02-03-HttpStatus.txt, 2k7-02-04-status-followup.txt, 
> 2k7-02-06-impl-catalog.txt
>
>
> The HttpStatus class not only represents a status code with associated 
> message, it also has static factory methods for creating objects with 
> hard-coded english status messages. Suggested improvements:
> - define HttpStatusFactory in the API
> - move the factory method stuff to impl, for example EnglishHttpStatusFactory
> - reduce HttpStatus class to representation only, final and serializable
> patch to follow when I find the time
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to