You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by "Jim Bonanno (JIRA)" <ji...@apache.org> on 2007/09/26 19:23:51 UTC

[jira] Created: (IVY-611) BasicURLHandler should use method=head for getURLInfo

BasicURLHandler should use method=head for getURLInfo
-----------------------------------------------------

                 Key: IVY-611
                 URL: https://issues.apache.org/jira/browse/IVY-611
             Project: Ivy
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.0.0-alpha-2
            Reporter: Jim Bonanno


We encountered a problem where ivys and artifacts are downloaded twice from the server. The problem only occurs with the BasicURLHandler, the HttpClientHandler correctly set the request method to HEAD is getURLInfo.

The fix to BasicURLHandler is set the request method to head. The info does not need the response body.


            if (con instanceof HttpURLConnection) {
                ((HttpURLConnection) con).setRequestMethod("HEAD");
                int status = ((HttpURLConnection) con).getResponseCode();


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (IVY-611) BasicURLHandler should use method=head for getURLInfo

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene resolved IVY-611.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0-beta-1

Good catch!
I've integrated your patch into trunk.

thanks,
Maarten

> BasicURLHandler should use method=head for getURLInfo
> -----------------------------------------------------
>
>                 Key: IVY-611
>                 URL: https://issues.apache.org/jira/browse/IVY-611
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0.0-alpha-2
>            Reporter: Jim Bonanno
>             Fix For: 2.0.0-beta-1
>
>
> We encountered a problem where ivys and artifacts are downloaded twice from the server. The problem only occurs with the BasicURLHandler, the HttpClientHandler correctly set the request method to HEAD is getURLInfo.
> The fix to BasicURLHandler is set the request method to head. The info does not need the response body.
>             if (con instanceof HttpURLConnection) {
>                 ((HttpURLConnection) con).setRequestMethod("HEAD");
>                 int status = ((HttpURLConnection) con).getResponseCode();

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-611) BasicURLHandler should use method=head for getURLInfo

Posted by "Jim Bonanno (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Bonanno updated IVY-611:
----------------------------

    Issue Type: Improvement  (was: Bug)

> BasicURLHandler should use method=head for getURLInfo
> -----------------------------------------------------
>
>                 Key: IVY-611
>                 URL: https://issues.apache.org/jira/browse/IVY-611
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0.0-alpha-2
>            Reporter: Jim Bonanno
>
> We encountered a problem where ivys and artifacts are downloaded twice from the server. The problem only occurs with the BasicURLHandler, the HttpClientHandler correctly set the request method to HEAD is getURLInfo.
> The fix to BasicURLHandler is set the request method to head. The info does not need the response body.
>             if (con instanceof HttpURLConnection) {
>                 ((HttpURLConnection) con).setRequestMethod("HEAD");
>                 int status = ((HttpURLConnection) con).getResponseCode();

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (IVY-611) BasicURLHandler should use method=head for getURLInfo

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene reassigned IVY-611:
---------------------------------

    Assignee: Maarten Coene

> BasicURLHandler should use method=head for getURLInfo
> -----------------------------------------------------
>
>                 Key: IVY-611
>                 URL: https://issues.apache.org/jira/browse/IVY-611
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0.0-alpha-2
>            Reporter: Jim Bonanno
>            Assignee: Maarten Coene
>             Fix For: 2.0.0-beta-1
>
>
> We encountered a problem where ivys and artifacts are downloaded twice from the server. The problem only occurs with the BasicURLHandler, the HttpClientHandler correctly set the request method to HEAD is getURLInfo.
> The fix to BasicURLHandler is set the request method to head. The info does not need the response body.
>             if (con instanceof HttpURLConnection) {
>                 ((HttpURLConnection) con).setRequestMethod("HEAD");
>                 int status = ((HttpURLConnection) con).getResponseCode();

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.