[jboss-jira] [JBoss JIRA] (DROOLS-66) It is impossible to switch off URL caching if https protocol is used

RH Bugzilla Integration (JIRA) jira-events at lists.jboss.org
Tue Apr 2 04:17:42 EDT 2013


    [ https://issues.jboss.org/browse/DROOLS-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764284#comment-12764284 ] 

RH Bugzilla Integration commented on DROOLS-66:
-----------------------------------------------

Marek Winkler <mwinkler at redhat.com> changed the Status of [bug 913252|https://bugzilla.redhat.com/show_bug.cgi?id=913252] from ON_QA to VERIFIED
                
> It is impossible to switch off URL caching if https protocol is used
> --------------------------------------------------------------------
>
>                 Key: DROOLS-66
>                 URL: https://issues.jboss.org/browse/DROOLS-66
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>         Environment: BRMS 5.3.1
>            Reporter: Alessandro Lazarotti
>            Assignee: Mark Proctor
>             Fix For: 6.0.0.Alpha1
>
>
> It is impossible to switch off URL caching if https protocol is used
> When used https to load resources from HTTP, a conditional mistake try to cache the content even though CACHE_DIR is null:
> // class org.drools.io.impl.UrlResource
>     public InputStream getInputStream() throws IOException {
>         (...)
>             if (lastMod > 0 && lastMod > lastRead) {
>                 if (CACHE_DIR != null && url.getProtocol().equals("http") || url.getProtocol().equals("https")) {
>                     //lets grab a copy and cache it in case we need it in future...
>                     cacheStream();
>                 }
>             }
>         (...)
>     }
> IF only "https" was evaluated as true -  ((false && false) || true)  -  so the exit will be true, which should be not the expected behaviour
> That code should be:
> if (CACHE_DIR != null && (url.getProtocol().equals("http") || url.getProtocol().equals("https"))) {
>                     //lets grab a copy and cache it in case we need it in future...
>                     cacheStream();
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list