hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Potapov <potapo...@gmail.com>
Subject Javadocs inconsistency concerning [Basic]HttpResponse in HttpCore-4.3
Date Tue, 03 Sep 2013 19:47:34 GMT
Hello everyone,

I'm a bit confused with some inconsistencies in javadocs concerning
HttpResponse. Probably you can confirm that some of these inconsistencies are
typos or bugs:
  1. [Basic]HttpResponse: getLocale/setLocale is marked as deprecated:
    "use org.apache.http.impl.DefaultHttpRequestFactory"
    Is org.apache.http.impl.DefaultHttpResponseFactory implied here?

  2. HttpResponse: setStatusCode has the following note in the description:
    "The reason phrase will be updated according to the new status code,
    based on the current locale".
    But in the BasicHttpResponse.setStatusCode implementation I see that
    'reasonPhrase' is left untouched. My first desire was to add the following
    line to this function (as it seems to be most elegant solution):
    "this.reasonPhrase = getReason(code)"
    but BasicHttpResponse.getReason is marked deprecated now, so this fix
    doesn't seem to be acceptable.

What is the correct way to set HttpResponse status code with reason phrase
update in HttpCore 4.3?

-- 
Dmitry

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


Mime
View raw message