You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Henning Schmiedehausen (JIRA)" <ji...@apache.org> on 2009/01/13 22:45:01 UTC

[jira] Created: (SHINDIG-845) Basic HTTP Fetcher should always set Content-Length header

Basic HTTP Fetcher should always set Content-Length header
----------------------------------------------------------

                 Key: SHINDIG-845
                 URL: https://issues.apache.org/jira/browse/SHINDIG-845
             Project: Shindig
          Issue Type: Bug
          Components: Gadget Rendering Server (Java)
    Affects Versions: trunk, 1.0.x-incubating
            Reporter: Henning Schmiedehausen
         Attachments: SHINDIG-845-trunk.patch

Running the 0.8 compliance test suite showed a consistent failure in test MKRT011, which turns out to do a "POST" with empty body to retrieve an XML stream. Tracing through the code, it sends out the code using the BasicHttpFetcher::fetch() method, which contains

      if (request.getPostBodyLength() > 0) {
        fetcher.setRequestProperty("Content-Length", String.valueOf(request.getPostBodyLength()));
        fetcher.setDoOutput(true);
        IOUtils.copy(request.getPostBody(), fetcher.getOutputStream());
      }

due to the fact that the body is empty, this skips setting the Content-Length header to 0. The site used in the test suite will return 503 on a POST request without a Content-Length header. The attached patches fix this behaviour for 1.0.x-incubating and trunk.



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


[jira] Resolved: (SHINDIG-845) Basic HTTP Fetcher should always set Content-Length header

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

Paul Lindner resolved SHINDIG-845.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.x-incubating
                   trunk

patched.  Thanks!


> Basic HTTP Fetcher should always set Content-Length header
> ----------------------------------------------------------
>
>                 Key: SHINDIG-845
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-845
>             Project: Shindig
>          Issue Type: Bug
>          Components: Gadget Rendering Server (Java)
>    Affects Versions: trunk, 1.0.x-incubating
>            Reporter: Henning Schmiedehausen
>             Fix For: trunk, 1.0.x-incubating
>
>         Attachments: SHINDIG-845-1.0.x-incubating.patch, SHINDIG-845-trunk.patch
>
>
> Running the 0.8 compliance test suite showed a consistent failure in test MKRT011, which turns out to do a "POST" with empty body to retrieve an XML stream. Tracing through the code, it sends out the code using the BasicHttpFetcher::fetch() method, which contains
>       if (request.getPostBodyLength() > 0) {
>         fetcher.setRequestProperty("Content-Length", String.valueOf(request.getPostBodyLength()));
>         fetcher.setDoOutput(true);
>         IOUtils.copy(request.getPostBody(), fetcher.getOutputStream());
>       }
> due to the fact that the body is empty, this skips setting the Content-Length header to 0. The site used in the test suite will return 503 on a POST request without a Content-Length header. The attached patches fix this behaviour for 1.0.x-incubating and trunk.

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


[jira] Updated: (SHINDIG-845) Basic HTTP Fetcher should always set Content-Length header

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

Henning Schmiedehausen updated SHINDIG-845:
-------------------------------------------

    Attachment: SHINDIG-845-trunk.patch

patch for trunk

> Basic HTTP Fetcher should always set Content-Length header
> ----------------------------------------------------------
>
>                 Key: SHINDIG-845
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-845
>             Project: Shindig
>          Issue Type: Bug
>          Components: Gadget Rendering Server (Java)
>    Affects Versions: trunk, 1.0.x-incubating
>            Reporter: Henning Schmiedehausen
>         Attachments: SHINDIG-845-trunk.patch
>
>
> Running the 0.8 compliance test suite showed a consistent failure in test MKRT011, which turns out to do a "POST" with empty body to retrieve an XML stream. Tracing through the code, it sends out the code using the BasicHttpFetcher::fetch() method, which contains
>       if (request.getPostBodyLength() > 0) {
>         fetcher.setRequestProperty("Content-Length", String.valueOf(request.getPostBodyLength()));
>         fetcher.setDoOutput(true);
>         IOUtils.copy(request.getPostBody(), fetcher.getOutputStream());
>       }
> due to the fact that the body is empty, this skips setting the Content-Length header to 0. The site used in the test suite will return 503 on a POST request without a Content-Length header. The attached patches fix this behaviour for 1.0.x-incubating and trunk.

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


[jira] Updated: (SHINDIG-845) Basic HTTP Fetcher should always set Content-Length header

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

Henning Schmiedehausen updated SHINDIG-845:
-------------------------------------------

    Attachment: SHINDIG-845-1.0.x-incubating.patch

patch for 1.0.x-incubating

> Basic HTTP Fetcher should always set Content-Length header
> ----------------------------------------------------------
>
>                 Key: SHINDIG-845
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-845
>             Project: Shindig
>          Issue Type: Bug
>          Components: Gadget Rendering Server (Java)
>    Affects Versions: trunk, 1.0.x-incubating
>            Reporter: Henning Schmiedehausen
>         Attachments: SHINDIG-845-1.0.x-incubating.patch, SHINDIG-845-trunk.patch
>
>
> Running the 0.8 compliance test suite showed a consistent failure in test MKRT011, which turns out to do a "POST" with empty body to retrieve an XML stream. Tracing through the code, it sends out the code using the BasicHttpFetcher::fetch() method, which contains
>       if (request.getPostBodyLength() > 0) {
>         fetcher.setRequestProperty("Content-Length", String.valueOf(request.getPostBodyLength()));
>         fetcher.setDoOutput(true);
>         IOUtils.copy(request.getPostBody(), fetcher.getOutputStream());
>       }
> due to the fact that the body is empty, this skips setting the Content-Length header to 0. The site used in the test suite will return 503 on a POST request without a Content-Length header. The attached patches fix this behaviour for 1.0.x-incubating and trunk.

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