[
https://issues.apache.org/jira/browse/HTTPCORE-39?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roland Weber reopened HTTPCORE-39:
----------------------------------
I'm afraid this needs some more cleanup. Now that we have a factory interface
for looking up the reason phrase for a status code, it is no longer appropriate
to handle this completely under the cover. I see two options: expect a reason
phrase whenever there is a status code (two methods in HttpResponse), or else
give BasicHttpResponse an optional reason phrase catalog to perform the lookup.
The first option assigns the lookup responsibility to the application. The
second one has an inconsistency if the status line is set as an object, in
which case the application would still have to do the lookup.
The first option is more appealing to me because the lookup responsibility is
assigned clearly.
I'll prepare a patch for review. It's going to be nasty :-(
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
>
>
> 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]