[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPCLIENT-986.
------------------------------------------

    Fix Version/s: 4.1 Alpha3
       Resolution: Fixed

Patch checked in. Many thanks, Jon

There are several reasons why the WarningValue class cannot be moved to 
HttpCore in its present form
(1) HttpCore base module should be Java 1.3 compatible (this requirement proved 
to be a miscalculation but cannot be easily changed at this point). This 
basically means no regex support.
(2) WarningValue imports util classes from org.apache.http.impl.cookie which 
would introduce a cyclic dependency on HttpClient
(3) Ideally WarningValue parser should be consistent with other core parsers 
and make use of CharArrayBuffer / ParserCursor API.

I think we are better off leaving WarningValue in the caching module for now.

Oleg

> cache module does not completely handle upstream Warning headers correctly
> --------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-986
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-986
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 4.1 Alpha2
>            Reporter: Jonathan Moore
>             Fix For: 4.1 Alpha3
>
>         Attachments: warning-handling.patch
>
>
> There are a couple of MUST requirements from the RFC for Warning headers that 
> aren't correctly handled by the current implementation:
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.46
> 1. "However, if a cache successfully validates a cache entry, it SHOULD 
> remove any Warning headers previously attached to that entry except as 
> specified for specific Warning codes. It MUST then add any Warning headers 
> received in the validating response."
> 2. "If an implementation receives a message with a warning-value that 
> includes a warn-date, and that warn-date is different from the Date value in 
> the response, then that warning-value MUST be deleted from the message before 
> storing, forwarding, or using it. (This prevents bad consequences of naive 
> caching of Warning header fields.) If all of the warning-values are deleted 
> for this reason, the Warning header MUST be deleted as well." 

-- 
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